DEV Community

eidher
eidher

Posted on

1

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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more