Skip to content

Trace context propagationΒΆ

Each Span carries a Context that includes metadata about the trace (like a unique trace identifier and span identifier) and any other data you choose to include. This context is propagated across process boundaries, allowing all the work that's part of a single trace to be linked together, even if it spans multiple services.

This guide explains how to propagate trace context across process boundaries in a few common scenarios. If you are using auto-instrumentation, trace context propagation is already handled for you.

OpenTelemetry Context Propagation on opentelemetry.io

Propagate trace context in HTTP requestsΒΆ

When a service makes an HTTP request to another service, it should include the trace context in the request headers. The receiving service can then use this context to create a new Span that's part of the same trace. OpenTelemetry provides a standard for how trace context should be propagated in HTTP requests, called the W3C Trace Context standard.