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
23 Nov 2026, 13:41 UTC
Harness
f018f71 · run run-2026-11-24
Raw JSON
run-2026-11-24.json → variants[id = "otel-python"]

Libraries

confluent-kafka2.16.1
flask3.1.3
grpcio1.85.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-c83b01c2,team=alpha
ot-baggage-routing-key rk-c83b01c2
traceparent 00-976cccff1bf1c26349dd5d796091611e-6010ec2e2f1f9deb-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--0f2dc644

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-c83b01c2,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-976cccff1bf1c26349dd5d796091611e-0ef3b6e7c9341e8b-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--0f2dc644
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-e6baa34d,team=alpha
ot-baggage-routing-key rk-e6baa34d
traceparent 00-d0bfc25fd20a2bb3113a1915de92adcf-373b65ecb0e3a829-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--5808665e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-e6baa34d,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-d0bfc25fd20a2bb3113a1915de92adcf-294b0b2a9d2c6f33-01
tracestate cptest=v1
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--http-grpc--5808665e
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-a7bd735c,team=alpha
ot-baggage-routing-key rk-a7bd735c
traceparent 00-ca67bb3ee94977853c942af621c0c807-771cf7cf5a0a7fb2-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--aac7262a

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-a7bd735c,team=alpha
traceparent 00-ca67bb3ee94977853c942af621c0c807-713de193f5508f5f-01
tracestate cptest=v1
test id
otel-python--http-kafka--aac7262a
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-4f46ddec,team=alpha
ot-baggage-routing-key rk-4f46ddec
traceparent 00-a496ddc61ece3af8632fb6c35ff2ba12-f7daae0a247d5623-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--cd18fd60

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

baggage routing-key=rk-4f46ddec,team=alpha
traceparent 00-a496ddc61ece3af8632fb6c35ff2ba12-0bb9e54e6f734e7a-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--cd18fd60
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-c75f7f1f,team=alpha
ot-baggage-routing-key rk-c75f7f1f
traceparent 00-cbf808538d81858f64a54a6a6d729df8-f492438c3af08bd8-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--6549b258

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-c75f7f1f,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-cbf808538d81858f64a54a6a6d729df8-9af954a879505bee-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--6549b258
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-1287ae31,team=alpha
ot-baggage-routing-key rk-1287ae31
traceparent 00-8c07ebcec82500bacb85af731582b613-f03d54e908102756-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--c256e1e7

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-1287ae31,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-8c07ebcec82500bacb85af731582b613-a587ce4da12658ba-01
tracestate cptest=v1
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--c256e1e7
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-18ac1da5,team=alpha
ot-baggage-routing-key rk-18ac1da5
traceparent 00-d2be868bf3541d43d7ce790d8a66f2f8-caa710075396e027-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--ecc6b3dc

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-18ac1da5,team=alpha
traceparent 00-d2be868bf3541d43d7ce790d8a66f2f8-a897837a1be927d8-01
tracestate cptest=v1
test id
otel-python--grpc-kafka--ecc6b3dc
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-ec9ec623,team=alpha
ot-baggage-routing-key rk-ec9ec623
traceparent 00-4d81009a3a335efb4b51a0ba30200b23-692f1533617808a9-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--8c986f7d

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

baggage routing-key=rk-ec9ec623,team=alpha
traceparent 00-4d81009a3a335efb4b51a0ba30200b23-586dc1dab54d178d-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--8c986f7d
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-d0aa81d0,team=alpha
ot-baggage-routing-key rk-d0aa81d0
traceparent 00-b5af8f2dc8b6ed873f525345aa452f9a-80e21ea0401a1243-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--61a7a02a

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-449956861a77eed386dd3b6476801ac9-1805ceafb5d34e16-03
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--61a7a02a
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-6d21ea58,team=alpha
ot-baggage-routing-key rk-6d21ea58
traceparent 00-88d86bd0ae1170cb3e4ea3dfbb0c7c41-91a3a96aebdd4471-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--ebc15ed4

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-92b13ec314ef697e14b33a2fd85972fe-6ecd4be84b2aafce-03
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--ebc15ed4
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-653fe0d5,team=alpha
ot-baggage-routing-key rk-653fe0d5
traceparent 00-76471334966af907ca6cf2a9d4e7e74d-e2e5aa0fc8bf16c5-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--a89348e9

Observed at the sink on the outbound Kafka record headers

traceparent 00-1a025f0dd1e0e28a8d09fc21b8d245cf-b877f529214107a2-03
test id
otel-python--kafka-kafka--a89348e9
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-9e1be974,team=alpha
ot-baggage-routing-key rk-9e1be974
traceparent 00-0610c51701a83695361ec261e0257355-17a7e276befe56dd-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--635899a5

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

traceparent 00-700c87f4e1d688831272ed4146717ae4-f423f09ae86a53a0-03
test id
otel-python--kafka-rabbitmq--635899a5
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-c150cd2d,team=alpha
ot-baggage-routing-key rk-c150cd2d
traceparent 00-eca250fd96e198150c51b5791120decd-6fc537b723c0850e-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--cf176dfa

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-c150cd2d,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-eca250fd96e198150c51b5791120decd-599cc5abd967e3cf-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--cf176dfa
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-501c4c68,team=alpha
ot-baggage-routing-key rk-501c4c68
traceparent 00-a16d11ef82bbc0d8365c4f7a0d14dc6c-98356b8ffc89208c-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--e8364839

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-501c4c68,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-a16d11ef82bbc0d8365c4f7a0d14dc6c-62804f42a32d274d-01
tracestate cptest=v1
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--e8364839
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-9308338c,team=alpha
ot-baggage-routing-key rk-9308338c
traceparent 00-dd844e554c105dc6fc460353f810bc66-9a1081233c338e7e-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--f3d77a2b

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-9308338c,team=alpha
traceparent 00-dd844e554c105dc6fc460353f810bc66-30f1a2fe661c6384-01
tracestate cptest=v1
test id
otel-python--rabbitmq-kafka--f3d77a2b
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-8a5f0f52,team=alpha
ot-baggage-routing-key rk-8a5f0f52
traceparent 00-924ecd3a757a7c667cfde556ef2eed8c-844ca03c46136a37-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--5134a0de

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

baggage routing-key=rk-8a5f0f52,team=alpha
traceparent 00-924ecd3a757a7c667cfde556ef2eed8c-51d1e4a74a95d019-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--5134a0de
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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