Learning path

Full curriculum

Full curriculum

Unit content

Execution tracing, spans and trace context

A single user-visible operation can pass through many functions, tasks or processes. Looking at each step independently can make the end-to-end path difficult to reconstruct.

A trace represents one operation as a collection of timed spans. A span records one unit of work and can name its parent, forming a tree or causal path through the operation.

When work crosses an asynchronous or process boundary, trace context can be propagated so the next span remains associated with the same trace instead of starting an unrelated record.

Traces reveal where latency accumulates and which part of one concrete operation failed. They preserve per-operation structure that aggregate metrics intentionally discard.

Trace identifiers are correlation data, not authentication credentials. Receiving an arbitrary trace ID should not grant authority.

Tracing works by carrying a small identity for the operation while each component records only the span it performs, allowing the complete path to be reconstructed later.