Distributed tracing follows a single request as it travels across many services, so you can see the end-to-end path and find where latency or errors occur. A correlation/trace ID ties all the spans of one request together.
How it works
The first service generates a trace ID; every downstream call propagates it (and a parent span ID) in headers.
http
GET /checkout HTTP/1.1
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
# trace-id ───────────────────────────^ ^── span-id
text
Trace abc123:
Gateway ├──────────────────────────────┤ 220ms
Orders ├────────────┤ 90ms
Payments ├──────┤ 60ms ← slow span found here
Inventory ├──┤ 15ms
