otel-python

Python zero-code opentelemetry-distro0.55b1

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.55b1 0.55b1 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:44 UTC
Harness
9b99070 · measured in backtest-otel-python-0.55b1
Raw JSON
0.55b1.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-e274b5a6,team=alpha
ot-baggage-routing-key rk-e274b5a6
traceparent 00-df8707ca1a6438785bf4ec35798d9515-1ad7ed5d5c6b829b-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--c605f466

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-e274b5a6,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-df8707ca1a6438785bf4ec35798d9515-cbe71948e598732e-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--c605f466
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-52f7f722,team=alpha
ot-baggage-routing-key rk-52f7f722
traceparent 00-364d3eb732fd87a988234c1a03aad507-9bae3951d2ec4a73-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--c012689d

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-52f7f722,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-364d3eb732fd87a988234c1a03aad507-4b8028b4880bd4bc-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--c012689d
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-efe27872,team=alpha
ot-baggage-routing-key rk-efe27872
traceparent 00-41cd7e831a87a2fbdd5638908e83e815-58fdefc2d692d174-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--4c7c8a41

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--http-kafka--4c7c8a41
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-49938053,team=alpha
ot-baggage-routing-key rk-49938053
traceparent 00-1ec282169f0e252d0abab2981eccac68-86077460c291975a-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--51cb965b

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

baggage routing-key=rk-49938053,team=alpha
traceparent 00-1ec282169f0e252d0abab2981eccac68-b0c224755c59c907-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--51cb965b
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-b44f5594,team=alpha
ot-baggage-routing-key rk-b44f5594
traceparent 00-55722265a2e6a6e92796da8dae88d245-6c87f1f6061e5bc2-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--8718eda9

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-b44f5594,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-55722265a2e6a6e92796da8dae88d245-fbff8829913af715-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--8718eda9
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-04b0fef1,team=alpha
ot-baggage-routing-key rk-04b0fef1
traceparent 00-7ceaa3108b5c69b77803f7798c37a60f-1a33e9fac9901a2a-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--89f81f35

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-04b0fef1,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-7ceaa3108b5c69b77803f7798c37a60f-22aecf0c923357d2-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--89f81f35
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-7e5f91ae,team=alpha
ot-baggage-routing-key rk-7e5f91ae
traceparent 00-a88512af352f133321b804edfdaa566f-92a12df13e0ba19c-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--66f054e2

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--grpc-kafka--66f054e2
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-406f65d4,team=alpha
ot-baggage-routing-key rk-406f65d4
traceparent 00-0614ce39f9c0af7a7c7a3ebda0f198e3-89c91dda24f12cba-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--e460fe36

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

baggage routing-key=rk-406f65d4,team=alpha
traceparent 00-0614ce39f9c0af7a7c7a3ebda0f198e3-f3b80fb5fd71880a-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--e460fe36
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-dde1adae,team=alpha
ot-baggage-routing-key rk-dde1adae
traceparent 00-2c1a89e3d43c6861988ed74255ca328d-d4206231eaa18c56-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--6b1edbc0

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-c42cbc1193ab2d591e6fb73ddd289e2b-e27dbe4126d2cc00-01
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--6b1edbc0
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-efc9ed7e,team=alpha
ot-baggage-routing-key rk-efc9ed7e
traceparent 00-84a96eb20b507a12a8ff822dc2e99312-c248abedb4e653cb-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--297bb681

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-ffd675b9c4bccfd23bf2fa03faa72faa-3d0180f504a2e0bd-01
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--297bb681
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-1e61465b,team=alpha
ot-baggage-routing-key rk-1e61465b
traceparent 00-edf1ed11839d15b0980a4fba089e04ef-ea4099a98bdfacbf-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--5bcaa89f

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--kafka-kafka--5bcaa89f
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-4cfc07fa,team=alpha
ot-baggage-routing-key rk-4cfc07fa
traceparent 00-51450efafcede8588bca09f076384883-381cf368a6db0811-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--7a877367

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

traceparent 00-c86570b7cc0fcd0be6044397d190c453-6adae87337dbcf7a-01
test id
otel-python--kafka-rabbitmq--7a877367
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-5b483be5,team=alpha
ot-baggage-routing-key rk-5b483be5
traceparent 00-db3739fbf9db0377a00a3f395beb7ed0-2b61ea1f133d4d2c-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--0ff141fd

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-5b483be5,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-db3739fbf9db0377a00a3f395beb7ed0-40927f8c15a4d016-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--0ff141fd
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-612969b0,team=alpha
ot-baggage-routing-key rk-612969b0
traceparent 00-525996b098c13f7043b97aa289119ff4-99a83da6f5da475b-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--f5879e09

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-612969b0,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-525996b098c13f7043b97aa289119ff4-f56c67677bb4e3db-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--f5879e09
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-245632e7,team=alpha
ot-baggage-routing-key rk-245632e7
traceparent 00-16f5a7984affff242e37f1a7b997ebb3-c7febd7a22abbb70-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--cec981c4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--rabbitmq-kafka--cec981c4
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-734f94c8,team=alpha
ot-baggage-routing-key rk-734f94c8
traceparent 00-06b50b3c33ac6894eece57d1c100fedc-dad33ecf7804a79e-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--fb5de220

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

baggage routing-key=rk-734f94c8,team=alpha
traceparent 00-06b50b3c33ac6894eece57d1c100fedc-315b7eb9bb51dad1-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--fb5de220
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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