Search code examples
tracew3copentracingdistributed-tracing

Difference between Opentracing and W3C Trace Context (with respect to headers)


The W3C trace context defines the traceparent and tracestate headers for enabling distributed tracing.

My question(s) is then

  1. How is it different from OpenTracing.
  2. If W3C has already defined usage of the headers, then is opentracing using some other headers?

Solution

  • OpenTracing, by design, did not define a format for propagating tracing headers. It was the responsibility of libraries who implemented OpenTracing to provide their own format for serialization/de-serialization of the span context. This was mostly an effort to be as broadly compatible as possible. Generally, you'll find three different popular header formats for OpenTracing - Zipkin (B3-*), Jaeger (uber-*), and the OpenTracing 'sample' headers (ot-*), although some vendors have started to add W3C TraceContext as well.

    OpenTelemetry has chosen to adopt W3C TraceContext as one of it's core propagation formats (in addition to Zipkin's B3 format) which should alleviate this problem in the future.