Distributed tracing with Spring Cloud Sleuth

The previous section addressed the microservices distributed and fragmented the logging issue by centralizing the log data. With the central logging solution, we have all the logs in central storage. However, still, it is almost impossible to trace end-to-end transactions. In order to do end-to-end tracking, transactions spanning across microservices need to have a correlation ID.

Twitter's Zipkin, Cloudera's HTrace, and Google's Dapper are examples of distributed tracing systems. The Spring Cloud provides a wrapper component on top of these using the Spring Cloud Sleuth library.

Distributed tracing works with the concepts of Span and Trace. Span is a unit of work, such as calling a service, identified ...

Get Spring 5.0 Microservices - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.