Member-only story
Distributed Tracing With OpenTelemetry, Spring Cloud Sleuth, Kafka, and Jaeger
A step-by-step guide for Distributed Tracing Implementation in Microservices

Distributed tracing gives you insight into how a particular service is performing as part of the whole in a distributed software system. It tracks and records requests from their point of origin to their destination and the systems through which they pass.
In this article, we are going to implement distributed tracing in three Spring Boot microservices using OpenTelemetry, Spring Cloud Sleuth, Kafka, and Jaeger.
Let’s first take a look at some of the basic terms in distributed tracing.
Span: Represents a single unit of work within the system. Spans can be nested within one another to model the decomposition of the work. For example, a span could be calling a REST endpoint and another child span could then be that endpoint calling another, and so on in a different service.
Trace: A collection of spans that all share the same root span, or more simply put all spans which were created as a direct result of the original request. The hierarchy of spans (each with its own parent span alongside the root span) can be used to form directed acyclic graphs showing the path of the request as it…