otel-python

Python zero-code opentelemetry-distro0.65b0

attach opentelemetry-instrument python app.py

36/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Explanations

OpenTelemetry, Elastic APM and New Relic never implemented the OpenTracing-era ot-baggage-* headers

by-design ot-baggage-* is a legacy OpenTracing convention; OpenTelemetry, Elastic APM and New Relic each define their propagation header set without it.

The seeded ot-baggage-routing-key header is ignored — neither extracted nor re-emitted — by every OpenTelemetry, Elastic and New Relic variant on every delivered boundary. None of these tools ever emitted the OpenTracing header format: OpenTelemetry standardised on W3C baggage; Elastic's agent spec defines traceparent, tracestate, baggage and the binary elasticapmtraceparent; New Relic's distributed-tracing model is traceparent, tracestate and the vendor newrelic header.

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). Where a tool propagates W3C baggage, the same values travel there instead.

356 cells affected

ot-baggage-not-implemented

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. No upstream issue names the baggage loss specifically — filing candidate.

12 cells affected

otel-python-confluent-kafka-consume-no-attach

Versions in this run

Tracer
opentelemetry-distro 0.65b0 this version 0.65b0 on pypi github
Runtime
python 3.12.14
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
7 Sept 2026, 10:50 UTC
Harness
commit not recorded · run run-2026-09-07
Raw JSON
run-2026-09-07.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-0ab9a599,team=alpha
ot-baggage-routing-key rk-0ab9a599
traceparent 00-03e5ccc52661bb7a84f3331e0c7b8798-1d435391c5c94112-01
tracestate cptest=v1
x-cp-canary otel-python--http-http--2b81cf65

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-0ab9a599,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-03e5ccc52661bb7a84f3331e0c7b8798-71d1eac19f5a93c2-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--http-http--2b81cf65
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-37c4a931,team=alpha
ot-baggage-routing-key rk-37c4a931
traceparent 00-dae7cc25a605d0f8f5d5018446ae3c7d-6ec9496923026bc2-01
tracestate cptest=v1
x-cp-canary otel-python--http-grpc--31f2ced8

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-37c4a931,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-dae7cc25a605d0f8f5d5018446ae3c7d-31c75307a9891e3c-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--http-grpc--31f2ced8
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-fed9b05e,team=alpha
ot-baggage-routing-key rk-fed9b05e
traceparent 00-a731000cd806830cbfd21155fab03771-472e2e0a1b1b114c-01
tracestate cptest=v1
x-cp-canary otel-python--http-kafka--ac065671

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-fed9b05e,team=alpha
traceparent 00-a731000cd806830cbfd21155fab03771-061c258d371168bd-01
tracestate cptest=v1
test id
otel-python--http-kafka--ac065671
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-6c037bf2,team=alpha
ot-baggage-routing-key rk-6c037bf2
traceparent 00-7ef91eef2b9efa9c0642c9ba96bc8340-6d2bbb615fb031bf-01
tracestate cptest=v1
x-cp-canary otel-python--http-rabbitmq--de0adaf6

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

baggage routing-key=rk-6c037bf2,team=alpha
traceparent 00-7ef91eef2b9efa9c0642c9ba96bc8340-0ab95828b8aafcbc-01
tracestate cptest=v1
test id
otel-python--http-rabbitmq--de0adaf6
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-84cf882a,team=alpha
ot-baggage-routing-key rk-84cf882a
traceparent 00-d487605a2509422fe5bee2c4e1dd52e9-55291aae9ef26522-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-http--f2b0cf63

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-84cf882a,team=alpha
connection keep-alive
content-length 47
content-type application/json
traceparent 00-d487605a2509422fe5bee2c4e1dd52e9-b9bd458dfa7cd7e9-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--grpc-http--f2b0cf63
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-3d84b40e,team=alpha
ot-baggage-routing-key rk-3d84b40e
traceparent 00-eb10d85d49afd685dd74f6a6d9fdcbff-e467650a2cbaa7cb-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-grpc--a6fdb993

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-3d84b40e,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-eb10d85d49afd685dd74f6a6d9fdcbff-9000a494c7433504-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--grpc-grpc--a6fdb993
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-50c362cf,team=alpha
ot-baggage-routing-key rk-50c362cf
traceparent 00-155a865e88934e00d57a69fa02a08d56-ae47ae6decb27760-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-kafka--42f307cb

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-50c362cf,team=alpha
traceparent 00-155a865e88934e00d57a69fa02a08d56-3869bc781264f385-01
tracestate cptest=v1
test id
otel-python--grpc-kafka--42f307cb
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-a16f8c0e,team=alpha
ot-baggage-routing-key rk-a16f8c0e
traceparent 00-525d2e7f1c2216ab557f118418f42a18-35afbdca79f49176-01
tracestate cptest=v1
x-cp-canary otel-python--grpc-rabbitmq--f303cd69

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

baggage routing-key=rk-a16f8c0e,team=alpha
traceparent 00-525d2e7f1c2216ab557f118418f42a18-510e44ace36dc029-01
tracestate cptest=v1
test id
otel-python--grpc-rabbitmq--f303cd69
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-f7a9bc30,team=alpha
ot-baggage-routing-key rk-f7a9bc30
traceparent 00-6ccf2723fbfde878bd22fd573b4b0af8-ce023d064ed887eb-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-http--940b5247

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-a43a92687cd712d2c9c0297f5c79082d-a98c340d7d65144c-03
user-agent python-requests/2.34.2
test id
otel-python--kafka-http--940b5247
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-b05dacf5,team=alpha
ot-baggage-routing-key rk-b05dacf5
traceparent 00-f61c8780f1aa174c6037d42da5cca25c-1734a637ff91940f-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-grpc--049b3a42

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-f8427d06b2e4c3b2d1f7d41c0c16fd66-bb8a1c8a8e7fed67-03
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--kafka-grpc--049b3a42
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-c84d0bb2,team=alpha
ot-baggage-routing-key rk-c84d0bb2
traceparent 00-e4ab0e3a8c8d12cc1f432993ad5f348d-de9b0a077f14ab33-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-kafka--d21d30e1

Observed at the sink on the outbound Kafka record headers

traceparent 00-56e3c7ab730034dc9c3e928c25305490-0310561e3f953352-03
test id
otel-python--kafka-kafka--d21d30e1
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-36030eea,team=alpha
ot-baggage-routing-key rk-36030eea
traceparent 00-0a2439f78d17385b89edb46e7a8ba4d6-08b12b95407119d8-01
tracestate cptest=v1
x-cp-canary otel-python--kafka-rabbitmq--0834a1f2

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

traceparent 00-5178115ff4a299c719fb0958f6a95e5c-b8d71255ce30950a-03
test id
otel-python--kafka-rabbitmq--0834a1f2
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-0a315100,team=alpha
ot-baggage-routing-key rk-0a315100
traceparent 00-0dd36b7cf91cca839838e8969ff3a17f-ba768dc8d8e59991-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-http--a2220962

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
baggage routing-key=rk-0a315100,team=alpha
connection keep-alive
content-length 51
content-type application/json
traceparent 00-0dd36b7cf91cca839838e8969ff3a17f-483d67fbb4c9b5af-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
otel-python--rabbitmq-http--a2220962
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-3deea125,team=alpha
ot-baggage-routing-key rk-3deea125
traceparent 00-ae4b6dd8b408d6ce69195bd461ffbb9a-ffe30a35471ce86f-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-grpc--dc63b597

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
baggage routing-key=rk-3deea125,team=alpha
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-ae4b6dd8b408d6ce69195bd461ffbb9a-92341cee4ec549f0-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-python--rabbitmq-grpc--dc63b597
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-36e95fb6,team=alpha
ot-baggage-routing-key rk-36e95fb6
traceparent 00-3f85b934326c73396c5519beb56c9d5e-b212af79ed402440-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-kafka--30985d85

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-36e95fb6,team=alpha
traceparent 00-3f85b934326c73396c5519beb56c9d5e-23dff4a340c65a72-01
tracestate cptest=v1
test id
otel-python--rabbitmq-kafka--30985d85
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-099a4876,team=alpha
ot-baggage-routing-key rk-099a4876
traceparent 00-05d5fd565a0c8b8066884af90af8dfb3-cf54b6620bcbbf97-01
tracestate cptest=v1
x-cp-canary otel-python--rabbitmq-rabbitmq--b2a92134

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

baggage routing-key=rk-099a4876,team=alpha
traceparent 00-05d5fd565a0c8b8066884af90af8dfb3-27bee3f8da96e2f4-01
tracestate cptest=v1
test id
otel-python--rabbitmq-rabbitmq--b2a92134
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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