The Tracing Context Propagation Rules
Context drops kill traces. The four rules that keep context flowing across queues, async tasks, and external calls.
Within a process
Use the standard context object (Go context.Context, Python contextvars). Never pass trace IDs as raw arguments.
Most languages have idiomatic patterns. Use them; do not reinvent.
Cross-process
W3C TraceContext headers (traceparent, tracestate). Add to every outbound HTTP call.
Test propagation explicitly. A trace that drops a hop is a broken integration.
Across queues and async
Inject trace context into the message body or headers. Extract on the consumer side.
Most queue libraries have OTel integrations. Use them.