In Microservices ecosystem, we have distributed application and microservices. How each distributed microservice is performing, what is the latency measurment of each component, and stuffs like this can be easily monitored using Distributed Tracing.
We have implemented a simple SpringBoot web service where we have integrated Spring Cloud Sleuth and Zipkin for the purpose of Distributed Tracing. Though we have only one web service for the demo, but the process of integration for the rest of the other microservices stays the same. If we have implemented for one microservice, the process for implementation is the same for the rest, and when all the microservices have implemented this, we get a seamless distributed tracing at one place.
What is Spring Cloud Sleuth?
Spring Cloud Sleuth implements a distributed tracing solution for Spring Cloud, borrowing heavily from Dapper, Zipkin and HTrace. In simple terms, Sleuth is a tool from Spring cloud family which is used to generate the trace id, span id and add these information to the service calls in the headers and MDC, so that these can be used with tools like Zipkin and ELK etc. to store, index and process log files.