What Is a Trace? Distributed Request Tracing Explained
A trace records the full journey of a single request or operation as it moves across the components of a system, stitched together from individual spans.
In a system made of many services, a single user action can touch a dozen of them. A trace follows that one action all the way through, showing where time was spent and where an error originated. Tracing is the observability signal built specifically for distributed systems, where metrics and logs alone cannot show how the pieces connect.
What a trace represents
A trace is the complete record of one request as it propagates through a system. It begins at the entry point and follows every downstream call, capturing timing and outcome at each hop. The result is a tree of operations that shows exactly what happened, in what order, and how long each part took.
Traces are made of spans
Each unit of work in a trace is a span: a named, timed operation such as a database query or an HTTP call. Spans nest to form a parent-child tree, and they share a trace ID so they can be assembled into one picture. A trace, then, is the collection of all spans that share that ID.
Context propagation
Tracing works because each service passes trace context, typically the trace ID and parent span ID, to the next service it calls, usually in request headers. This propagation is what lets a trace cross process and network boundaries and remain one coherent record instead of disconnected fragments.
What traces reveal
Traces excel at finding where latency and errors actually originate. A request that is slow overall might be waiting on one downstream call; a trace shows you which one. Visualized as a flame graph, a trace makes the critical path obvious and points the investigation straight at the bottleneck.
Traces in CI/CD
The same idea applies to pipelines. Model a pipeline run as a trace and each job or step as a span, and you get a flame-graph view of where the build spends its wall-clock time. That makes it clear whether a slow pipeline is dominated by one stage, by queue time, or by many small steps adding up.
Key takeaways
- A trace records one request end to end across services.
- It is assembled from nested spans sharing a trace ID.
- Context propagation lets traces cross process boundaries.
- Pipelines can be traced to reveal where build time goes.