The Trace Context specification uses two primary HTTP headers to propagate distributed tracing context: traceparent and tracestate.
traceparent: A standardized, vendor-neutral header that represents the incoming request in a common format understood by all tracing systems. It is the primary mechanism for correlation.tracestate: A header used to carry vendor-specific information. It allows different tracing systems (e.g., Congo and Rojo) to coexist in a single trace by passing proprietary metadata alongside the standard traceparent.
Propagation Pattern:
When a service receives these headers, it must carry them forward to outbound requests. If a service uses a specific tracing vendor, it should add its own entry to the tracestate header at the left-most position. This ensures the next receiver knows which system corresponds with the current traceparent context.
# Example of a client using Congo tracing system
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
tracestate: congo=t61rcWkgMzE
# Example of a receiving server using Rojo tracing system
# It carries over the existing tracestate and adds its own entry to the left
traceparent: 00-0af7651916cd43dd8448eb211c80319c-00f067aa0ba902b7-01
tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE