otel-python

Python zero-code opentelemetry-distro0.66b2

attach opentelemetry-instrument python app.py

36/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).

140 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 in this run

Tracer
opentelemetry-distro 0.66b2 this version 0.66b2 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
25 Nov 2026, 00:15 UTC
Harness
b9a3348 · run run-2026-11-25.1
Raw JSON
run-2026-11-25.1.json → variants[id = "otel-python"]

Libraries

confluent-kafka2.16.2
flask3.1.3
grpcio1.85.3
rabbitmqpika 1.5.0
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-d6bb80bb,team=alpha
ot-baggage-routing-key rk-d6bb80bb
traceparent 00-9cbe469efa89e8d7b263e44bf316e4b6-5c39e648724cdf4e-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--ba5bd12f

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-d6bb80bb,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-9cbe469efa89e8d7b263e44bf316e4b6-d419ded1a6980be7-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--ba5bd12f
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-5fc901d2,team=alpha
ot-baggage-routing-key rk-5fc901d2
traceparent 00-8b6a0190d2e92ec8022c16596ac87545-c24583ab5542000a-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--76aab567

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-5fc901d2,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-8b6a0190d2e92ec8022c16596ac87545-c1c8fa5b0ff4e8c2-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--http-grpc--76aab567
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-1f670f6c,team=alpha
ot-baggage-routing-key rk-1f670f6c
traceparent 00-c5591f3e218fc74a59b7f5dd9e959f0a-b6dcede25731c69c-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--c1e47dd0

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-1f670f6c,team=alpha
traceparent 00-c5591f3e218fc74a59b7f5dd9e959f0a-e4e6764c290a1323-01
tracestate cptest=v1
test id
otel-python--http-kafka--c1e47dd0
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound HTTP request headers

baggage routing-key=rk-3def8cad,team=alpha
ot-baggage-routing-key rk-3def8cad
traceparent 00-ec18725d38a30509be6636dffc8855f4-3c944f38f764e897-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--ea03fa92

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

baggage routing-key=rk-3def8cad,team=alpha
traceparent 00-ec18725d38a30509be6636dffc8855f4-6d198d2f1d0028d8-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--ea03fa92
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-9608405b,team=alpha
ot-baggage-routing-key rk-9608405b
traceparent 00-46c4f81caaf25814ab87b5e667e667f9-1a45b0b5b89dfbf4-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--22a79efd

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-9608405b,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-46c4f81caaf25814ab87b5e667e667f9-004abc59220dc693-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--22a79efd
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-b1e57368,team=alpha
ot-baggage-routing-key rk-b1e57368
traceparent 00-7fd72939406a8c9e16490ca378fe702f-5bdbae3136b00e9e-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--ec591e09

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-b1e57368,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-7fd72939406a8c9e16490ca378fe702f-e2f7ab41cc9eeea5-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--ec591e09
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-3c2f6750,team=alpha
ot-baggage-routing-key rk-3c2f6750
traceparent 00-479d75940fc57f23833062e96360c13b-bec64a19914966c2-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--ce9b013e

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-3c2f6750,team=alpha
traceparent 00-479d75940fc57f23833062e96360c13b-21718f6ab6d73d51-01
tracestate cptest=v1
test id
otel-python--grpc-kafka--ce9b013e
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound gRPC metadata

baggage routing-key=rk-ba788e02,team=alpha
ot-baggage-routing-key rk-ba788e02
traceparent 00-73af70bf13be670b97b0b12a4d261e84-1cf1af02142e8152-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--d4d74b05

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

baggage routing-key=rk-ba788e02,team=alpha
traceparent 00-73af70bf13be670b97b0b12a4d261e84-815fcfc49c0bc479-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--d4d74b05
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-d9cdde47,team=alpha
ot-baggage-routing-key rk-d9cdde47
traceparent 00-5f3a97450ca8960f2ccfad39c1e4cf02-507eb4a499b8cf38-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--962e81dc

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-d7f1bdf2a04872b8afc87727aca11d95-b659303dbc6a9b4f-03
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--962e81dc
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-df1c7dd7,team=alpha
ot-baggage-routing-key rk-df1c7dd7
traceparent 00-65accbbe58348bbbbaa2e83245c1d667-56401d1f9c38d662-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--5b6c286e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-8f353288e8f88d345a8bd8364e6bafbe-e8fab02dd952dded-03
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--5b6c286e
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-f7f6edcf,team=alpha
ot-baggage-routing-key rk-f7f6edcf
traceparent 00-525f0e53b338e7408e62f476dd2c7556-859bd95b742791ff-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--094a6137

Observed at the sink on the outbound Kafka record headers

traceparent 00-7f97cf8300afcdd7f3dc512bcfb8e935-e05ebba1c47e3d72-03
test id
otel-python--kafka-kafka--094a6137
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound Kafka record headers

baggage routing-key=rk-15ba4203,team=alpha
ot-baggage-routing-key rk-15ba4203
traceparent 00-daa58878fa8c991bbb13ce9c8abaea6f-e45b95aa4f090fff-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--6140ebcf

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

traceparent 00-1f4d1beb50ef667b6d02d4ec81620495-b340f599b60b3015-03
test id
otel-python--kafka-rabbitmq--6140ebcf
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-3b00045c,team=alpha
ot-baggage-routing-key rk-3b00045c
traceparent 00-7905ba639cd00c72ab36de6fcc430fb8-59d8a19ab12ee7c4-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--6db59076

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-3b00045c,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-7905ba639cd00c72ab36de6fcc430fb8-0c9b84001b47a331-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--6db59076
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-a3f253fb,team=alpha
ot-baggage-routing-key rk-a3f253fb
traceparent 00-a37fa3fed14852da8722a1a19271f4c0-8c3f2bb162425e68-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--9b14c354

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-a3f253fb,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-a37fa3fed14852da8722a1a19271f4c0-14332fda9f424a6b-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--9b14c354
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-4006cbe3,team=alpha
ot-baggage-routing-key rk-4006cbe3
traceparent 00-684a823223b8846c5a369209590c3a6b-3d901b6236cc5ce4-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--61f92614

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-4006cbe3,team=alpha
traceparent 00-684a823223b8846c5a369209590c3a6b-3ab61b37e16ba57b-01
tracestate cptest=v1
test id
otel-python--rabbitmq-kafka--61f92614
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_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-6c2a69cc,team=alpha
ot-baggage-routing-key rk-6c2a69cc
traceparent 00-c076c52704af755ea23bd67458c467e6-acf89e5be59b7ed0-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--fe5ff792

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

baggage routing-key=rk-6c2a69cc,team=alpha
traceparent 00-c076c52704af755ea23bd67458c467e6-a1a4f8aae9d472cb-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--fe5ff792
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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