This article demonstrates how to integrate Dubbo with the Skywalking full-link monitoring system. For complete examples, please refer to dubbo-samples-tracing-skywalking. The required Skywalking Agent version is skywalking micrometer-1.10 api.
To add Micrometer and related Metrics dependencies to the classpath, you need to include the dubbo-metrics-api
dependency as follows:
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-metrics-api</artifactId>
</dependency>
To integrate Dubbo Micrometer tracing data into Skywalking, add the following dependency.
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-micrometer-1.10</artifactId>
</dependency>
@Configuration
public class ObservationConfiguration {
@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;
}
}
Please refer here for how to set up Skywalking OAP
bash startup.sh
First, we assume you already have a registry to coordinate address discovery, details can be found in the registry configuration pointed to in the example.
Then, start the Provider and Consumer and ensure that the skywalking-agent parameters are correctly set, as skywalking-agent ensures data can be correctly reported to the backend system.
plugins
directory./path/to/skywalking-agent/agent.config
, the corresponding parameter item is collector.backend_service
.java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar dubbo-samples-spring-boot-tracing-skwalking-provider-1.0-SNAPSHOT.jar
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar dubbo-samples-spring-boot-tracing-skwalking-consumer-1.0-SNAPSHOT.jar
Open [skywalking-webapp](http://localhost:8080/)
in your browser to see the effect