otel-python

Python zero-code opentelemetry-distro0.49b2

attach opentelemetry-instrument python app.py

27/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Explanations

OpenTelemetry carries the OpenTracing-era ot-baggage-* headers only with the opt-in ottrace propagator

config ot-baggage-* is a legacy OpenTracing convention. OpenTelemetry's default propagators are tracecontext and baggage; the OT Trace propagator that carries ot-baggage-* has to be selected.

The seeded ot-baggage-routing-key header is neither extracted nor re-emitted by any OpenTelemetry variant on any delivered boundary. Every variant here runs the SDK's default propagator set, tracecontext,baggage, and that set does not include the OpenTracing header format: OpenTelemetry standardised on W3C baggage, and the same values travel there instead.

The OpenTelemetry specification does list an opt-in OT Trace propagator (OTEL_PROPAGATORS=ottrace, marked deprecated) that reads and writes ot-tracer-traceid, ot-tracer-spanid, ot-tracer-sampled and ot-baggage-*, for applications migrating from OpenTracing. Several SDKs ship it as a separate package; it is never in the default set, and the harness has not measured it, so whether it makes these cells pass is documented, not verified.

The header outlives its deprecation only in Datadog's Java, Node and Go tracers, where it crosses all 16 boundaries as legacy behaviour of the datadog style (see datadog-ot-baggage-not-implemented for the Datadog tracers that do not carry it).

16 cells affected

otel-ot-baggage-not-default

OTel Python: confluent-kafka consumer links the producer context but never attaches it

open opentelemetry-instrumentation-confluent-kafka starts the consume span with the producer context as a link and never calls context.attach().

The poll() wrapper in opentelemetry-instrumentation-confluent-kafka (0.65b0) calls _create_new_consume_span, which does start_span(..., links=links) with the extracted producer context as a link. The package never calls opentelemetry.context.attach(), so the extracted context, and the baggage riding on it, is never made current for the code that processes the message. Every kafka->* leg therefore starts a new trace, and baggage and the foreign tracestate entry are gone. All eight RabbitMQ boundaries pass via opentelemetry-instrumentation-pika, whose per-message callback wrapper extracts and attaches before invoking the handler. The failure is a per-instrumentation design choice, not a language limitation.

Reported at least four times since 2023 across confluent-kafka, kafka-python and aiokafka. The only fix attempt (PR #1678) was closed unmerged by the stale bot; the maintainers' position (#3465) is that manually attaching the context is the intended usage.

Workaround: after poll(), run context.attach(propagate.extract(headers)) yourself before making outbound calls. Upstream fix: attach the extracted context (or make the consume span current) in the instrumentation, as the pika instrumentation already does. We found no upstream issue that names the baggage loss specifically.

12 cells affected

otel-python-confluent-kafka-consume-no-attach

Versions measured

Tracer
opentelemetry-distro 0.49b2 0.49b2 on pypi github
Runtime
python 3.12.16
Setup tier
zero-code Runtime attach only: an agent flag, a preload require, the CLR profiler environment, a php.ini extension. No application source involved.
Attach
opentelemetry-instrument python app.py
Relay source
relays/python
Ran at
10 Nov 2026, 08:34 UTC
Harness
9b99070 · measured in backtest-otel-python-0.49b2
Raw JSON
0.49b2.json → variants[id = "otel-python"]

Libraries

confluent-kafka2.15.0
flask3.1.3
grpcio1.83.1
rabbitmqpika 1.4.4
requests2.34.2

Configuration

OTEL_PROPAGATORStracecontext,baggage
OTEL_TRACES_EXPORTERnone

Evidence per hop

What the driver seeded and what the sink observed, one entry per boundary.

HTTP HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound HTTP request headers

baggage routing-key=rk-e65ab773,team=alpha
ot-baggage-routing-key rk-e65ab773
traceparent 00-605de152b07843db7cb2949594008d8b-86a581adfd4b5da3-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--b5bc234f

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-e65ab773,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-605de152b07843db7cb2949594008d8b-cff27181af8c024f-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--b5bc234f
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound HTTP request headers

baggage routing-key=rk-baa689fa,team=alpha
ot-baggage-routing-key rk-baa689fa
traceparent 00-0b73b66d40b51a7975399e4390622c32-465221e52f60ac6f-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--ffbb0c37

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-baa689fa,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-0b73b66d40b51a7975399e4390622c32-134b671bdc242613-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--ffbb0c37
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound HTTP request headers

baggage routing-key=rk-23fae4c6,team=alpha
ot-baggage-routing-key rk-23fae4c6
traceparent 00-83dc6753e777290846e8ea9d93502ba0-bcf0cd686ae90c53-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--321a4de0

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--http-kafka--321a4de0
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound HTTP request headers

baggage routing-key=rk-a1b687e7,team=alpha
ot-baggage-routing-key rk-a1b687e7
traceparent 00-3333d522ab6a23ad8f71f3dc5cbd07e2-dd5a47882ee15fa5-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--d2038c1f

Observed at the sink on the outbound AMQP 0-9-1 message headers

baggage routing-key=rk-a1b687e7,team=alpha
traceparent 00-3333d522ab6a23ad8f71f3dc5cbd07e2-3e5c79d859dc4705-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--d2038c1f
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-c91eea11,team=alpha
ot-baggage-routing-key rk-c91eea11
traceparent 00-9b79b8d8bcdff72679aadeadc3754b37-9e16fac49caf3f58-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--6daf15ca

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-c91eea11,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-9b79b8d8bcdff72679aadeadc3754b37-03bc3d88f9b93ea1-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--6daf15ca
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-09fcf17c,team=alpha
ot-baggage-routing-key rk-09fcf17c
traceparent 00-cb90f0e96b277fb49c13fd1f7107dc06-5cdf638a71490385-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--04d5d863

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-09fcf17c,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-cb90f0e96b277fb49c13fd1f7107dc06-31973f23682c0dbc-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--04d5d863
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-265469b6,team=alpha
ot-baggage-routing-key rk-265469b6
traceparent 00-e6a4c529e4766d3e2f3a49f105a1aaa8-2f7a449263f1d97e-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--7c70d9ef

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--grpc-kafka--7c70d9ef
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound gRPC metadata

baggage routing-key=rk-87b6249b,team=alpha
ot-baggage-routing-key rk-87b6249b
traceparent 00-1556971294a24b0e16eb929da643c223-086ac79b389248af-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--4312086c

Observed at the sink on the outbound AMQP 0-9-1 message headers

baggage routing-key=rk-87b6249b,team=alpha
traceparent 00-1556971294a24b0e16eb929da643c223-8a03653311097bc8-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--4312086c
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-f32e4959,team=alpha
ot-baggage-routing-key rk-f32e4959
traceparent 00-a99806cf2db7a2308128853c1e418b95-b7c94603509a19f3-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--acbecdd8

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
connection keep-alive
content-length 48
content-type application/json
traceparent 00-9315bdd055b24392c0280bb1c3210d8d-da771a65faf62c5f-01
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--acbecdd8
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-b420c7e7,team=alpha
ot-baggage-routing-key rk-b420c7e7
traceparent 00-a8a217943e5f0cf213b0b1d86f402244-c045f8f7135865c8-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--b07b5e63

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-06aa8db4527f59702b4794f369cb2ed1-78b5d3beb3715fee-01
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--b07b5e63
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound Kafka record headers

baggage routing-key=rk-81554adc,team=alpha
ot-baggage-routing-key rk-81554adc
traceparent 00-ce8d460a0b545b0f18b5b3330d7c870e-4f7911077b43d960-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--eb9ccd16

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--kafka-kafka--eb9ccd16
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound Kafka record headers

baggage routing-key=rk-6848d8d0,team=alpha
ot-baggage-routing-key rk-6848d8d0
traceparent 00-9a4c894e6dbae4c19afe3b82cc64c3a7-d831920a07b1280e-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--c9f0d797

Observed at the sink on the outbound AMQP 0-9-1 message headers

traceparent 00-ed647d314637e37279519515b1701da6-d682429549677dba-01
test id
otel-python--kafka-rabbitmq--c9f0d797
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
RabbitMQ HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-d6e46bfd,team=alpha
ot-baggage-routing-key rk-d6e46bfd
traceparent 00-3bf9fdbe7f9fff6f6c1683c3f5690d53-589af1d5f26a9260-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--1c9d8928

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-d6e46bfd,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-3bf9fdbe7f9fff6f6c1683c3f5690d53-e64a9872a966fab3-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--1c9d8928
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
RabbitMQ gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-eee6e5c3,team=alpha
ot-baggage-routing-key rk-eee6e5c3
traceparent 00-c590d3b6377bcbc851e6cce1c97bcdfa-ad2572466b22333f-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--67b97145

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-eee6e5c3,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-c590d3b6377bcbc851e6cce1c97bcdfa-2ebd3352c8be4a11-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--67b97145
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
RabbitMQ Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-73b0ce3e,team=alpha
ot-baggage-routing-key rk-73b0ce3e
traceparent 00-da25bbde679d4dffc3361939041e5768-69c83ba9f2f6fb33-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--cfc86eaa

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--rabbitmq-kafka--cfc86eaa
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
RabbitMQ RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-50afd6f9,team=alpha
ot-baggage-routing-key rk-50afd6f9
traceparent 00-5e05230a6d733fafb8860b2da9931608-bb688c4b6ac179fe-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--8878e1fa

Observed at the sink on the outbound AMQP 0-9-1 message headers

baggage routing-key=rk-50afd6f9,team=alpha
traceparent 00-5e05230a6d733fafb8860b2da9931608-5a98a87b6e557a43-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--8878e1fa
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

Cells are generated by the harness, never transcribed from documentation. Report a wrong one.