intermediate · Module 2.3
Distributed Tracing & W3C Trace Context
Learning Objectives
- Read a trace as a tree of parent/child spans sharing one trace ID.
- Decode the traceparent header format and its sampling flag.
- Identify the critical path (longest root-to-leaf chain) in a play request.
Key Concepts
Spans and the trace tree
Each span has a span ID, an optional parent span ID, start/end timestamps, and attributes. Children are time-contained within their parent; all spans share one trace ID.
traceparent format
traceparent is version-traceid-spanid-flags, e.g. 00-<32hex>-<16hex>-01, where the final byte's low bit is the sampled flag.
Critical path
The critical path is the longest-duration root-to-leaf chain; reducing overall latency means shortening the critical path, not an off-path span.
Insight
A DRM license round-trip is frequently on the OTT play critical path — optimize it and video-start latency drops directly.
Info
The Trace Waterfall Explorer sandbox highlights the critical path and can simulate a 504 timeout.
Knowledge Check
1. In the traceparent value 00-4bf9...-00f0...-01, what does the trailing 01 indicate?
2. What defines the critical path of a trace?
3. What must be true of a child span relative to its parent?