Spring Sleuth provides Spring Boot auto-configuration for distributed tracing. Skywalking integrates its micrometer so that it can send metrics to the Skywalking Meter System.
pom.xml
file. You can find more details at Toolkit micrometer.<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-micrometer-registry</artifactId> <version>${skywalking.version}</version> </dependency>
@Bean SkywalkingMeterRegistry skywalkingMeterRegistry() { // Add rate configs If you need, otherwise using none args construct SkywalkingConfig config = new SkywalkingConfig(Arrays.asList("")); return new SkywalkingMeterRegistry(config); }
application.yml
.receiver-meter: selector: ${SW_RECEIVER_METER:default} default:
Configure the meter config file. It already has the spring sleuth meter config. If you have a customized meter at the agent side, please configure the meter using the steps set out in the meter document.
Enable Spring sleuth config in application.yml
.
agent-analyzer: selector: ${SW_AGENT_ANALYZER:default} default: meterAnalyzerActiveFiles: ${SW_METER_ANALYZER_ACTIVE_FILES:spring-sleuth}
Open the dashboard view. Click edit
button to edit the templates.
Create a new template. Template type: Standard
-> Template Configuration: Spring
-> Input the Template Name.
Click view
button. You'll see the spring sleuth dashboard.
Three types of information are supported: Application, System, and JVM.