Distributed Tracing
A single API request can travel through an API gateway, service, database, cache, queue, and several downstream services.
Distributed tracing attaches trace context to requests so the complete journey can be reconstructed.
A trace contains spans representing operations such as HTTP handling, database queries, Redis calls, and downstream API calls.
Correlation IDs help connect logs, while distributed trace IDs provide a richer view of request execution across services.
Distributed Trace