otel-python

Python zero-code opentelemetry-distro0.55b0

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.55b0 0.55b0 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, 07:47 UTC
Harness
9b99070 · measured in backtest-otel-python-0.55b0
Raw JSON
0.55b0.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-6cbacf50,team=alpha
ot-baggage-routing-key rk-6cbacf50
traceparent 00-5032561a558305cc2d24ae0ee4f3fad9-b647168114a7b2c6-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--cf8b5f06

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-6cbacf50,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-5032561a558305cc2d24ae0ee4f3fad9-2997440d159b9352-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--cf8b5f06
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-7e0aedfc,team=alpha
ot-baggage-routing-key rk-7e0aedfc
traceparent 00-46f427ed4e52bf0674d24448430463cf-3a291d8302955a2b-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--2874c6ab

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-7e0aedfc,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-46f427ed4e52bf0674d24448430463cf-b02bd6211e363e55-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--2874c6ab
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-36a10f5e,team=alpha
ot-baggage-routing-key rk-36a10f5e
traceparent 00-c796640884313b1464677e46cdc118fe-957a20fe0b0baa3a-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--e47be5b4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--http-kafka--e47be5b4
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-92444423,team=alpha
ot-baggage-routing-key rk-92444423
traceparent 00-e1d2d2152ecab8393cfc150ed3d83a73-4f4acd1c479a5120-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--8053878a

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

baggage routing-key=rk-92444423,team=alpha
traceparent 00-e1d2d2152ecab8393cfc150ed3d83a73-53f30cf571f1488a-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--8053878a
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-3e05c84e,team=alpha
ot-baggage-routing-key rk-3e05c84e
traceparent 00-307a1cff58955ded530d289bbc717767-119635f665d1004c-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--5c36b752

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-3e05c84e,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-307a1cff58955ded530d289bbc717767-bf540281451720ba-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--5c36b752
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-eeb6979e,team=alpha
ot-baggage-routing-key rk-eeb6979e
traceparent 00-d28a3b74822e4f80516aeb5a1b11e777-3794cc6add137763-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--cc96326f

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-eeb6979e,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-d28a3b74822e4f80516aeb5a1b11e777-8e932263bca4c21c-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--cc96326f
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-983ecd3e,team=alpha
ot-baggage-routing-key rk-983ecd3e
traceparent 00-6209db9aed7ee1f0bec19774df425191-add0a93661ad7ed2-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--fb60099b

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--grpc-kafka--fb60099b
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-51650eb2,team=alpha
ot-baggage-routing-key rk-51650eb2
traceparent 00-aee5d2f609ec9d9d644073715d0c6265-a6c92a9f72ed357c-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--0490e4ad

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

baggage routing-key=rk-51650eb2,team=alpha
traceparent 00-aee5d2f609ec9d9d644073715d0c6265-110cb8c5a4a0f9bd-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--0490e4ad
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-cf77f3ea,team=alpha
ot-baggage-routing-key rk-cf77f3ea
traceparent 00-c714d438a2f286f2dede29475941dc23-f067d001564ed4c0-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--fa7ccff5

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-b7db9b03bba57ca9f80f30e319cdd71b-412e9f3e55546f65-01
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--fa7ccff5
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-fa316ad9,team=alpha
ot-baggage-routing-key rk-fa316ad9
traceparent 00-83c3e62f63b7a8f4abedab8dceb24904-c04e9191db9372d2-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--07c11ae8

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-2c23ad7beccf30095c7594614b3c09c0-e3141767279274b3-01
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--07c11ae8
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-909d2bea,team=alpha
ot-baggage-routing-key rk-909d2bea
traceparent 00-9755b098d2bdbbc4e95922ff6a4e753b-1daf3859507f4685-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--3710150a

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--kafka-kafka--3710150a
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-d9d0abca,team=alpha
ot-baggage-routing-key rk-d9d0abca
traceparent 00-70d9577045b7d06490343800b1c90c0e-b981d305a5cb5e08-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--e96214d0

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

traceparent 00-a5062b95df6c1239cbb4fcf91dba4b5c-aa2fd1368828df37-01
test id
otel-python--kafka-rabbitmq--e96214d0
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-a3bbcd7a,team=alpha
ot-baggage-routing-key rk-a3bbcd7a
traceparent 00-038b335475d53bdd9c200acfa6dca3c9-0098b3f0b0060763-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--b373fdee

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-a3bbcd7a,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-038b335475d53bdd9c200acfa6dca3c9-fd9046320ebf1d3f-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--b373fdee
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-01dec1cd,team=alpha
ot-baggage-routing-key rk-01dec1cd
traceparent 00-68a6e5bd35a1906a66bf4f05a403e1d0-0180c2177bdc26ba-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--852e2f84

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-01dec1cd,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-68a6e5bd35a1906a66bf4f05a403e1d0-bf41a237240b3e8b-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--852e2f84
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-a4a779a7,team=alpha
ot-baggage-routing-key rk-a4a779a7
traceparent 00-cbf17935ff195cf9e02567f8b6fe527e-9910046b7f90c9d6-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--114caff5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--rabbitmq-kafka--114caff5
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-e634bd27,team=alpha
ot-baggage-routing-key rk-e634bd27
traceparent 00-f73997872edb2d3e42ab7bcdc5701033-75466a99be97e68a-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--4626b365

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

baggage routing-key=rk-e634bd27,team=alpha
traceparent 00-f73997872edb2d3e42ab7bcdc5701033-07eb99eacc44ee51-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--4626b365
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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