Member-only story
OpenTracing using Spring Cloud Sleuth
Introduction
In the world of microservices, a distributed transaction moves across multiple services. OpenTracing would be very helpful to reduce Mean Time To Detect (MTTD) an issue in a distributed transaction.

Trace: Description of a distributed transaction that moves across multiple services.
Span: Timed operation within a distributed transaction. A group of spans form a trace
Span Context: As the distributed transaction moves from one service to another service, the span context needs to be propagated as well. Span Context can be propagated using B3 propagation, a specification for the header “B3” and those that start with “X-B3-”. Below are the“X-B3-” headers propagated through the network call.
X-B3-TraceId
X-B3-ParentSpanId
X-B3-SpanId
X-B3-Sampled
Zipkin is a distributed tracing system. It helps gather timing data needed to troubleshoot latency problems in service architectures. Features include both the collection and lookup of this data by Trace Id.
Run the below commands to run Zipkin server in local machinecurl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
Spring Cloud Sleuth provides Spring Boot auto-configuration…