Logo

dev-resources.site

for different kinds of informations.

Distributed Tracing

Published at
2/21/2023
Categories
spring
sleuth
zipkin
Author
eidher
Categories
3 categories in total
spring
open
sleuth
open
zipkin
open
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>

Properties

spring.sleuth.sampler.probability=1.0

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/

Featured ones: