otel-python

Python zero-code opentelemetry-distro0.53b1

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.53b1 0.53b1 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:57 UTC
Harness
9b99070 · measured in backtest-otel-python-0.53b1
Raw JSON
0.53b1.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-d28ad9c0,team=alpha
ot-baggage-routing-key rk-d28ad9c0
traceparent 00-829a4a4d179426206873b9a3dc9f1d8b-bc71fa21904bdbaa-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--63bea48d

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-d28ad9c0,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-829a4a4d179426206873b9a3dc9f1d8b-64e5f9b2c80c8e07-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--63bea48d
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-9f41acff,team=alpha
ot-baggage-routing-key rk-9f41acff
traceparent 00-a64a8d8f00dbbd2df7b19987a06d1314-ab008125457c06a8-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--80ebcaa1

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-9f41acff,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-a64a8d8f00dbbd2df7b19987a06d1314-c1dc9d68d601a28b-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--80ebcaa1
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-eaa9c540,team=alpha
ot-baggage-routing-key rk-eaa9c540
traceparent 00-41f85008b8c3952681ee5e075b81c437-2bd72055143944de-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--baa6eee2

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--http-kafka--baa6eee2
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-82f61a43,team=alpha
ot-baggage-routing-key rk-82f61a43
traceparent 00-0987b878c1504e2ea5a07f4c4f19bb46-58f49c13dde15d56-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--4d00d748

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

baggage routing-key=rk-82f61a43,team=alpha
traceparent 00-0987b878c1504e2ea5a07f4c4f19bb46-95e6388c1be3e83e-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--4d00d748
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-4307532a,team=alpha
ot-baggage-routing-key rk-4307532a
traceparent 00-4f2edf1eba3c147c232e7c55ce935b8f-4c53ddea535f57f6-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--64907829

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-4307532a,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-4f2edf1eba3c147c232e7c55ce935b8f-21344cb0a8cd8e8c-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--64907829
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-d127aab2,team=alpha
ot-baggage-routing-key rk-d127aab2
traceparent 00-ffbdf20f8652fa25f8c521d5ad8a1a9d-6f487f5aed92df86-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--4fbc0ad7

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-d127aab2,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-ffbdf20f8652fa25f8c521d5ad8a1a9d-2c2e3375d0ecf434-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--4fbc0ad7
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-3eac2744,team=alpha
ot-baggage-routing-key rk-3eac2744
traceparent 00-6ba08e758570282a3077decef418397a-ca3dfbb5ab34a0af-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--748e1f70

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--grpc-kafka--748e1f70
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-4c589c58,team=alpha
ot-baggage-routing-key rk-4c589c58
traceparent 00-f32831b077ffa3a82e09393d75ea3e86-71a37573e45d7ec3-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--9e9852d9

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

baggage routing-key=rk-4c589c58,team=alpha
traceparent 00-f32831b077ffa3a82e09393d75ea3e86-a8a5743af0d6a8b6-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--9e9852d9
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-63da7726,team=alpha
ot-baggage-routing-key rk-63da7726
traceparent 00-b0d41f9ee2a504bf978936b61626929a-dd214fb09b7bc62a-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--7486d035

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-188797578d9a84800b06340ea74f430a-d935dec173fdb887-01
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--7486d035
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-a7b295ad,team=alpha
ot-baggage-routing-key rk-a7b295ad
traceparent 00-20d13cab865915a51cae4865efa18833-077ea141651740c7-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--458d0490

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-9a6fce66f1ffd3097f7459bf284f3bff-cff2b256d14d2def-01
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--458d0490
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-ab5763e1,team=alpha
ot-baggage-routing-key rk-ab5763e1
traceparent 00-d2f62b0b6fd7cba814fc022e863253d8-8ec079d5a0abdeed-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--4f5d6200

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--kafka-kafka--4f5d6200
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-6125f00d,team=alpha
ot-baggage-routing-key rk-6125f00d
traceparent 00-390bd92b9b0ea934ef2651a6ff12aafe-ea80fdee9a216931-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--7585a0f2

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

traceparent 00-b2fe3ee52f19d7d9ca9e51604efa67af-912d019543945708-01
test id
otel-python--kafka-rabbitmq--7585a0f2
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-c93da1a7,team=alpha
ot-baggage-routing-key rk-c93da1a7
traceparent 00-9414b8cb2b968acb3afafa4368f137f0-91ce2eaa1909cf6b-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--bd57a342

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-c93da1a7,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-9414b8cb2b968acb3afafa4368f137f0-2a79e1f9e7919208-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--bd57a342
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-fa37c5dc,team=alpha
ot-baggage-routing-key rk-fa37c5dc
traceparent 00-acdd262adfdaf230566a89ecfb72c310-4b83593c6ef0bfd3-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--f3a545a9

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-fa37c5dc,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-acdd262adfdaf230566a89ecfb72c310-7257a88ff114cf54-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--f3a545a9
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-4af12113,team=alpha
ot-baggage-routing-key rk-4af12113
traceparent 00-e83bd94d7a2a857c7882ca1e99c69b01-42d64dc075156aaa-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--714d6960

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-python--rabbitmq-kafka--714d6960
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-04d71d69,team=alpha
ot-baggage-routing-key rk-04d71d69
traceparent 00-8ca04e9c05361336436f9d823d6479cd-e967ccd758287845-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--5b9edc9b

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

baggage routing-key=rk-04d71d69,team=alpha
traceparent 00-8ca04e9c05361336436f9d823d6479cd-c1a9a8f5d44ebbc4-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--5b9edc9b
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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