Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skywalking接入例子错误,且尝试修复后也没采集到信息 #999

Open
FunnyIceCube opened this issue Oct 8, 2023 · 4 comments

Comments

@FunnyIceCube
Copy link

image
会找不到ObservationRegistry observationRegistry这个bean,然后我声明了一个之后服务能运行了,但是也采集不到dubbo的信息

我的代码:

@Configuration
public class ObservationConfiguration {

    @Bean
    ObservationRegistry observationRegistry() {
        // Here we create the Observation Registry with attached handlers
        ObservationRegistry registry = ObservationRegistry.create();
// Here we add a meter handler
        registry.observationConfig()
                .observationHandler(new ObservationHandler.FirstMatchingCompositeObservationHandler(
                        (ObservationHandler<? extends Observation.Context>) new SkywalkingMeterHandler(new SkywalkingMeterRegistry())
                ));
        return registry;
    }

    @Bean
    ApplicationModel applicationModel(ObservationRegistry observationRegistry) {
        ApplicationModel applicationModel = ApplicationModel.defaultModel();
        observationRegistry.observationConfig()
                .observationHandler(new ObservationHandler.FirstMatchingCompositeObservationHandler(
                        new SkywalkingSenderTracingHandler(), new SkywalkingReceiverTracingHandler(),
                        new SkywalkingDefaultTracingHandler()
                ));
        applicationModel.getBeanFactory().registerBean(observationRegistry);
        return applicationModel;
    }
}

pom

       <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>2.7.10</version>
        </dependency>
        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-metrics-api</artifactId>
            <version>3.1.7</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>apm-toolkit-micrometer-1.10</artifactId>
            <version>9.0.0</version>
        </dependency>
@AlbumenJ
Copy link
Member

AlbumenJ commented Oct 9, 2023

你是期望接入 skywalking 的 tracing 还是 metrics

@FunnyIceCube
Copy link
Author

你是期望接入 skywalking 的 tracing 还是 metrics

都想接

@FunnyIceCube
Copy link
Author

我现在skywalking里endpoint里能看到dubbo的接口,但是其中没有任何数据
我尝试清理了agent里的plugin,之后就什么dubbo信息也采集不到了

@AlbumenJ
Copy link
Member

我现在skywalking里endpoint里能看到dubbo的接口,但是其中没有任何数据 我尝试清理了agent里的plugin,之后就什么dubbo信息也采集不到了

目前 skywalking 接入只需要 agent 配置即可,不需要通过 SDK 的。
你所提到的 SDK 的方式是接 ot 的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants