Slide 1 of 4

What is a trace?

What is a trace?

Following one request across every service it touches, and recording the timing and relationships at each step, is called distributed tracing. The record it produces is a trace: the whole journey of one request as it moves through all the services of a distributed system.

One request, one trace

Take the slow checkout request from the last slide. As it travels its request path, tracing records each step:

  • A request arrives at the web service.
  • The web service calls the cart service to read the basket.
  • The cart service calls the payments service to charge the card.
  • Finally, the payments service calls the inventory service to reserve stock.

All of these steps belong to the same request, so they’re stitched together into one trace. Every step in that trace shares one trace ID, the identifier that marks them as part of the same request’s journey.

Why it helps

A trace is the one view that follows the request across service boundaries. You see the full path in a single place, instead of piecing it together from separate services’ logs.

Script

Take that same slow checkout. Following that one request across every service it touches, and recording the timing and the relationships at each step, is distributed tracing. What it produces is a trace, the whole journey of that request in one place.

Walk the checkout and you can watch it form. The request lands on the web service, which calls the cart to read the basket, which calls payments to charge the card, which calls inventory to reserve stock. Every one of those steps belongs to the same request.

What stitches them together is a shared trace ID, the identifier that marks each step as part of the same journey.

And that’s the payoff. Instead of piecing the story together from four services’ separate logs, the trace follows the request across every boundary and shows you the whole path at once.