When your distributed system includes services instrumented with different tracing libraries (such as Zipkin, Jaeger, or W3C-compliant tools), trace context can break at service boundaries. Managed Service for OpenTelemetry propagates trace IDs and span IDs across services through HTTP headers using configurable formats, so you can maintain end-to-end traces across heterogeneous environments.
By default, Managed Service for OpenTelemetry uses tracecontext and baggage (the W3C standards). If your services use other formats, configure the propagator to match.
Supported formats
| Format | HTTP header | Description |
|---|---|---|
tracecontext | traceparent: {version}-{trace-id}-{parent-id}-{trace-flags} | W3C standard. Default format. See W3C Trace Context. |
baggage | Defined by the W3C Baggage specification | W3C standard for propagating key-value pairs. Default format. See W3C Baggage. |
b3 | b3: {TraceId}-{SpanId}-{SamplingState}-{ParentSpanId} | Single-header format for Zipkin-based systems. See OpenZipkin B3. |
b3multi | X-B3-TraceId: {TraceId}X-B3-SpanId: {SpanId}X-B3-ParentSpanId: {ParentSpanId}X-B3-Sampled: {SamplingState} | Multi-header format for Zipkin-based systems. See OpenZipkin B3. |
jaeger | uber-trace-id: {trace-id}:{span-id}:{parent-span-id}:{flags} | For services instrumented with the Jaeger client. See Jaeger propagation format. |
xray | AWS X-Ray format | For services integrated with AWS X-Ray. |
ottrace | OpenTracing format | Legacy format for OpenTracing-instrumented services. |
none | No headers injected or extracted | Disables context propagation entirely. |
Configure the propagation format
Specify the propagation format when starting an application. Use either a Java system property or an environment variable.
Use a Java system property
Add -Dotel.propagators to the JVM startup arguments. Separate multiple formats with commas.
java -javaagent:/path/to/opentelemetry-javaagent.jar \
-Dotel.resource.attributes=service.name=<your-service-name> \
-Dotel.exporter.otlp.headers=Authentication=<your-token> \
-Dotel.exporter.otlp.endpoint=<your-endpoint> \
-Dotel.metrics.exporter=none \
-Dotel.propagators=tracecontext,baggage,b3 \
-jar <your-app>.jar| Placeholder | Description |
|---|---|
<your-service-name> | Name that identifies the service in traces |
<your-token> | Authentication token for the OTLP endpoint |
<your-endpoint> | OTLP collector endpoint URL |
<your-app> | Application JAR filename |
Use an environment variable
Set the OTEL_PROPAGATORS environment variable before starting the application. Separate multiple formats with commas.
export OTEL_PROPAGATORS="b3"Then start the application as usual.
Behavior with multiple formats
When you specify multiple formats (for example, tracecontext,baggage,b3), the propagator injects and extracts headers for all listed formats on every request.
Keep the following in mind:
Default formats:
tracecontextandbaggageare W3C standards supported by most modern observability platforms. Start with these unless your services require a different format.Zipkin compatibility: Use
b3(single header) orb3multi(separate headers) for Zipkin-based tracing systems.Jaeger compatibility: Use
jaegerfor services instrumented with the Jaeger client.Disable propagation: Set the format to
noneto stop injecting and extracting trace context headers.