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

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.66b2 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
30 Nov 2026, 06:43 UTC
Harness
b33e402 · measured in run-2026-11-30
Raw JSON
0.66b2.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-59b5159d,team=alpha
ot-baggage-routing-key rk-59b5159d
traceparent 00-514d339899c37dfd5d4aff2bf64c460e-0267beb5eef6aa8b-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--c18f7f4e

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-59b5159d,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-514d339899c37dfd5d4aff2bf64c460e-a20cf8920fce3a1c-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--c18f7f4e
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-4e2b2cbe,team=alpha
ot-baggage-routing-key rk-4e2b2cbe
traceparent 00-9ba8e34d09ec4a4993befc1d4881c6c6-376cc38c387092ed-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--3a353e35

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-4e2b2cbe,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-9ba8e34d09ec4a4993befc1d4881c6c6-ee1aa5bdcb685fdb-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--http-grpc--3a353e35
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-a6c1f97c,team=alpha
ot-baggage-routing-key rk-a6c1f97c
traceparent 00-21e6db7b0dfa3800e34a9017ceadc0d9-53395b168c746589-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--882147e9

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-a6c1f97c,team=alpha
traceparent 00-21e6db7b0dfa3800e34a9017ceadc0d9-cda8a975ac8fb0bf-01
tracestate cptest=v1
test id
otel-python--http-kafka--882147e9
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-8724f1d5,team=alpha
ot-baggage-routing-key rk-8724f1d5
traceparent 00-842ef1105fd68a440d4cff316b4beccf-670898ba9da72638-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--ebebe1bd

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

baggage routing-key=rk-8724f1d5,team=alpha
traceparent 00-842ef1105fd68a440d4cff316b4beccf-8f4d94fefc198adb-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--ebebe1bd
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-96a444ef,team=alpha
ot-baggage-routing-key rk-96a444ef
traceparent 00-1f66f57fdafdfad4a42d872e7be2a653-086b1e6f2d88e30a-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--45bb07eb

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-96a444ef,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-1f66f57fdafdfad4a42d872e7be2a653-e5fd32864e03b232-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--45bb07eb
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-29bb0abc,team=alpha
ot-baggage-routing-key rk-29bb0abc
traceparent 00-412b1c644c45ff2fecedc6c661706638-03ce0b45083f0831-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--08bae003

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-29bb0abc,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-412b1c644c45ff2fecedc6c661706638-8c81be4b487f6768-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--08bae003
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-92b0b155,team=alpha
ot-baggage-routing-key rk-92b0b155
traceparent 00-7846a56adb34dff034390cb295e45ba2-23509f94d1322129-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--f1a65867

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-92b0b155,team=alpha
traceparent 00-7846a56adb34dff034390cb295e45ba2-5ef6575e8e711e99-01
tracestate cptest=v1
test id
otel-python--grpc-kafka--f1a65867
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-886b5be0,team=alpha
ot-baggage-routing-key rk-886b5be0
traceparent 00-eb532fbc8d4c7c0741d0b39d4d3fa08b-85e71bed5ab6f4f1-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--4e3c0553

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

baggage routing-key=rk-886b5be0,team=alpha
traceparent 00-eb532fbc8d4c7c0741d0b39d4d3fa08b-a1599c21bd70f497-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--4e3c0553
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-e3347799,team=alpha
ot-baggage-routing-key rk-e3347799
traceparent 00-c31b837df275904f55b3572e2d7ac9cc-25bac6e4d0cf1c8c-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--2ae0f729

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-8b9040089675280ef102a1383aa21024-e77c1e526b9a6fd3-03
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--2ae0f729
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-bb495b81,team=alpha
ot-baggage-routing-key rk-bb495b81
traceparent 00-1c235d2618002173fc1db214087b00ba-87bfd1faaec5491d-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--07fb964e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-18e97439e1ca1e399fc9c1a88b5f917c-a66de4f728420b16-03
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--07fb964e
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-8564f964,team=alpha
ot-baggage-routing-key rk-8564f964
traceparent 00-abe81e0e4029f63bc2caed72ad26bb7e-60ba48517ba62b17-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--34992bae

Observed at the sink on the outbound Kafka record headers

traceparent 00-9fd66b95510dd126487db4c2f290bc0a-5af8831f13771d8c-03
test id
otel-python--kafka-kafka--34992bae
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-2dc4157c,team=alpha
ot-baggage-routing-key rk-2dc4157c
traceparent 00-324b2b49ffb4761517e92676020645c9-6d9c423471d19c58-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--1970bea3

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

traceparent 00-359167c83962526ae5fb4d696b09820e-f4deb856554becc7-03
test id
otel-python--kafka-rabbitmq--1970bea3
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-a41c9b1b,team=alpha
ot-baggage-routing-key rk-a41c9b1b
traceparent 00-49e0abb48ecb31843555f342f42a2f84-922aa051ef9b12fa-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--011cc24f

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-a41c9b1b,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-49e0abb48ecb31843555f342f42a2f84-9940255af0ded56e-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--011cc24f
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-6e4c947d,team=alpha
ot-baggage-routing-key rk-6e4c947d
traceparent 00-1c1ef67729e88b31c2b90eee8608cd5f-2b17ace37a9376e0-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--20e253be

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-6e4c947d,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-1c1ef67729e88b31c2b90eee8608cd5f-9293caa8f9145557-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--20e253be
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-281cff68,team=alpha
ot-baggage-routing-key rk-281cff68
traceparent 00-d9281889fac8ba0d44afdc1011551c1d-76a1a619a4898e33-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--a4445932

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-281cff68,team=alpha
traceparent 00-d9281889fac8ba0d44afdc1011551c1d-389ba5cc54138317-01
tracestate cptest=v1
test id
otel-python--rabbitmq-kafka--a4445932
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-1c68358a,team=alpha
ot-baggage-routing-key rk-1c68358a
traceparent 00-b6bde0e3bdaef48703700a2dcf7405f7-6778eeccf60334c0-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--2c2d9dde

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

baggage routing-key=rk-1c68358a,team=alpha
traceparent 00-b6bde0e3bdaef48703700a2dcf7405f7-dfa1ebedd7e7a96a-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--2c2d9dde
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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