otel-python

Python zero-code opentelemetry-distro0.66b1

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

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.66b1 0.66b1 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
9 Nov 2026, 19:32 UTC
Harness
3bf9ebd · measured in backtest-otel-python-0.66b1
Raw JSON
0.66b1.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-0fc9d17b,team=alpha
ot-baggage-routing-key rk-0fc9d17b
traceparent 00-662f2ed2d837a4fa993032d6d8829e98-f725f108178d268a-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--546d8f42

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-0fc9d17b,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-662f2ed2d837a4fa993032d6d8829e98-5b8459c906823c31-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--546d8f42
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-03060e57,team=alpha
ot-baggage-routing-key rk-03060e57
traceparent 00-18470499f93159f8fecd07da4d15907d-e652e995c677db8d-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--b4dc111c

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-03060e57,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-18470499f93159f8fecd07da4d15907d-ddde55015a0e027d-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--b4dc111c
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-80871e3a,team=alpha
ot-baggage-routing-key rk-80871e3a
traceparent 00-562829ab2f8554c92ac1feeb0969a6b8-a1c8be07f20040cf-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--661c506d

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-80871e3a,team=alpha
traceparent 00-562829ab2f8554c92ac1feeb0969a6b8-a561260031d2e085-01
tracestate cptest=v1
test id
otel-python--http-kafka--661c506d
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-d0cb93f9,team=alpha
ot-baggage-routing-key rk-d0cb93f9
traceparent 00-e31ec4f78597c6c6356441da744946e5-8963302df70399c0-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--e0c6e888

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

baggage routing-key=rk-d0cb93f9,team=alpha
traceparent 00-e31ec4f78597c6c6356441da744946e5-329ddec68a092348-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--e0c6e888
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-9a6f3dfd,team=alpha
ot-baggage-routing-key rk-9a6f3dfd
traceparent 00-8e297096e853946ecd4212b38f5c69c7-bd368ec2c4e1b977-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--0a56eee1

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-9a6f3dfd,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-8e297096e853946ecd4212b38f5c69c7-8a6aa1cb2151fe48-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--0a56eee1
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-0fef487b,team=alpha
ot-baggage-routing-key rk-0fef487b
traceparent 00-3a058d9b42c0c28f748e86c12f7ecf44-084c183f98ba2463-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--4cf81a49

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-0fef487b,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3a058d9b42c0c28f748e86c12f7ecf44-c35e1fbe2a39fa72-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--4cf81a49
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-fc9e3d84,team=alpha
ot-baggage-routing-key rk-fc9e3d84
traceparent 00-fc621bcb834dfef81f64328b5fb391c1-f3d19fc14c5bb4a3-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--94d41907

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-fc9e3d84,team=alpha
traceparent 00-fc621bcb834dfef81f64328b5fb391c1-6c3358747c73978a-01
tracestate cptest=v1
test id
otel-python--grpc-kafka--94d41907
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-8936156f,team=alpha
ot-baggage-routing-key rk-8936156f
traceparent 00-2358d7b65484b8e84fa2385ae8dc6bdc-c6702653f94e660e-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--00c52d6f

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

baggage routing-key=rk-8936156f,team=alpha
traceparent 00-2358d7b65484b8e84fa2385ae8dc6bdc-baa9384475d38999-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--00c52d6f
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-86633e6b,team=alpha
ot-baggage-routing-key rk-86633e6b
traceparent 00-e6a3714faedb16d039008d4a294d9642-0ceea576f524f5bf-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--576bc9a6

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-7efbf170acfdd45abf18fcb040571d5f-a8db21e6d0e5bda8-03
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--576bc9a6
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-4dda6c02,team=alpha
ot-baggage-routing-key rk-4dda6c02
traceparent 00-ad675a29a10ede7fa0fb16c7250006d8-81c4cf4485a75483-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--531aa281

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-c3544c71e0444831b3e272325f7c2def-ab49c82a83d7fc6a-03
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--531aa281
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-49fee4e9,team=alpha
ot-baggage-routing-key rk-49fee4e9
traceparent 00-0f6aeef7e572e589f4358a18bec71844-5d3cbd4d90161b54-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--11d8425f

Observed at the sink on the outbound Kafka record headers

traceparent 00-59b1736ef9f7fbf2746e04fcd21c3195-ae0fb2b1d47392e0-03
test id
otel-python--kafka-kafka--11d8425f
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-fd4811ba,team=alpha
ot-baggage-routing-key rk-fd4811ba
traceparent 00-ed86ca65266af53d54e5c5c8a7d9fbea-c2029425f0ecec56-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--c75901d7

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

traceparent 00-a5c7577a3f0f2297d9f4fc4957ae72f4-189936154d72b1c3-03
test id
otel-python--kafka-rabbitmq--c75901d7
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-fa9c47ab,team=alpha
ot-baggage-routing-key rk-fa9c47ab
traceparent 00-b78ff4601a9326b0e76d642255c6dee7-26592bd1fd70daca-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--4acef131

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-fa9c47ab,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-b78ff4601a9326b0e76d642255c6dee7-2ada768d2b9bb4da-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--4acef131
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-7a9e8cab,team=alpha
ot-baggage-routing-key rk-7a9e8cab
traceparent 00-3079fdf613c8c4f24a5253152de0aba3-10512a5ebf6f1a21-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--d7cf9570

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-7a9e8cab,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3079fdf613c8c4f24a5253152de0aba3-03bbab1fd8d23cec-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--d7cf9570
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-b4c8e75f,team=alpha
ot-baggage-routing-key rk-b4c8e75f
traceparent 00-9f96a5be3d782fef8187c8f0738c28d5-e0e08accefc7b81e-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--b29a1e81

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-b4c8e75f,team=alpha
traceparent 00-9f96a5be3d782fef8187c8f0738c28d5-7f904520c983ace0-01
tracestate cptest=v1
test id
otel-python--rabbitmq-kafka--b29a1e81
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-d7f635cb,team=alpha
ot-baggage-routing-key rk-d7f635cb
traceparent 00-7e799b92009ddfec10b236d85f80656e-0500b70f2803ba21-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--0e5e5c2c

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

baggage routing-key=rk-d7f635cb,team=alpha
traceparent 00-7e799b92009ddfec10b236d85f80656e-34173a8286c8dcb5-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--0e5e5c2c
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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