DEV Community

eidher
eidher

Posted on

Distributed Tracing

Spring Cloud Sleuth provides Spring Boot auto-configuration for distributed tracing.
https://spring.io/projects/spring-cloud-sleuth#overview

Zipkin is a distributed tracing system.
https://zipkin.io

Dependencies

<dependency>
  <artifactId>spring-cloud-starter-sleuth</artifactId>
  <groupId>org.springframework.cloud</groupId>
</dependency>

<dependency>
  <artifactId>spring-cloud-sleuth-zipkin</artifactId>
  <groupId>org.springframework.cloud</groupId>
</dependency>

<dependency>
  <artifactId>spring-rabbit</artifactId>
  <groupId>org.springframework.amqp</groupId>
</dependency>
Enter fullscreen mode Exit fullscreen mode

Properties

spring.sleuth.sampler.probability=1.0
Enter fullscreen mode Exit fullscreen mode

Now, if you have zipkin and rabbitmq running, you can call your service and see the traces in zipkin.

For more information see https://www.appsdeveloperblog.com/spring-cloud-sleuth-and-zipkin/

Top comments (0)