elastic-python

Python init-only elastic-apm6.14.0

attach ElasticAPM(app) Flask middleware + instrument()

6/64 cells pass
W3C baggage 0/16
in ↓out → httpgrpckafkarmq
http
grpc
kafka
rmq

2 of 16 undelivered, counted as not passing

W3C tracestate 2/16
in ↓out → httpgrpckafkarmq
http
grpc
kafka
rmq

2 of 16 undelivered, counted as not passing

W3C traceparent (trace continuity) 4/16
in ↓out → httpgrpckafkarmq
http
grpc
kafka
rmq

2 of 16 undelivered, counted as not passing

ot-baggage-* (OpenTracing legacy) 0/16
in ↓out → httpgrpckafkarmq
http
grpc
kafka
rmq

2 of 16 undelivered, counted as not passing

  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Explanations

Elastic APM and New Relic have no OpenTracing-era ot-baggage-* propagation

by-design ot-baggage-* is a legacy OpenTracing convention; Elastic APM and New Relic each define their propagation header set without it and offer no option that adds it.

The seeded ot-baggage-routing-key header is neither extracted nor re-emitted by any Elastic or New Relic variant on any delivered boundary. Neither tool writes the OpenTracing header format: 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. Neither documents a setting that adds ot-baggage-*.

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.

14 cells affected

ot-baggage-not-implemented

Elastic Node, Python, Ruby and PHP agents do not propagate W3C baggage on any boundary

open Only Elastic's Java agent (and .NET over HTTP/gRPC) implements the baggage propagation the agent spec mandates; these agents drop it on every boundary.

Elastic's agent spec mandates baggage support, but only the Java agent delivers it end-to-end. elastic-apm-node 4.18.0 has no W3C baggage implementation; elastic-apm (Python) 6.26.2, elastic-apm (Ruby) 4.9.0 and elastic_apm (PHP) 1.17.0 measure baggage absent on every boundary, including http->http where traceparent/tracestate continue. The seeded member is neither extracted nor re-emitted.

Outside Java, Elastic APM cannot currently carry application baggage across protocol boundaries; a user must forward the baggage header as an application header themselves. Elastic's Node distributed-tracing docs likewise describe manual traceparent passing only (no tracestate or baggage). We found no upstream issue requesting W3C baggage in these agents.

16 cells affected

elastic-agents-no-w3c-baggage

elastic-apm Python: gRPC server interceptor assigns the tracestate header name instead of its value

open server_interceptor.py has `tracestate = metadata.key`, so after a gRPC hop the outbound tracestate is the literal string 'tracestate'; foreign entries are lost.

gRPC-inbound continues the trace (traceparent passes) but drops foreign tracestate entries: the outbound tracestate header emitted after a gRPC hop is the literal string tracestate. The root cause is a one-line bug in elasticapm/contrib/grpc/server_interceptor.py (v6.26.2, lines 66–73): elif metadata.key == "tracestate": tracestate = metadata.key. The header name is assigned instead of its value. Still unfixed on main (file last touched Oct 2023).

In the same package, the async variant (async_server_interceptor.py) never reads invocation_metadata at all, so the async gRPC server path does not extract trace context.

We found no upstream report of either; the fix for the first is one line (metadata.key → metadata.value). This is the only tracestate corruption observed among all tracers that continued a trace.

2 cells affected

elastic-python-grpc-tracestate-key-bug

elastic-apm Python has no confluent-kafka or pika instrumentation

open The Python agent's only messaging client is kafka-python; confluent-kafka and pika are uninstrumented: nothing is injected, consumers start no transaction.

The Python supported-technologies page lists kafka-python (>=2.0,<3) as its only messaging client; confluent-kafka and pika appear nowhere. On elastic-apm 6.26.2 nothing is injected into produced Kafka records or published AMQP messages, and consumers start no transaction, so even the outbound HTTP/gRPC calls after a consume carry no headers at all (absent, not a new trace).

RabbitMQ has been requested since Dec 2019 (#678: "It would be of high value to add instrumentation and distributed tracing for message brokers and, in particular, RabbitMQ"), still open. Workaround: start a transaction manually in the consumer with the received traceparent and inject headers manually on produce/publish.

24 cells affected

elastic-python-no-confluent-kafka-or-pika

Versions measured

Tracer
elastic-apm 6.14.0 6.14.0 on pypi github
Runtime
python 3.12.16
Setup tier
init-only A boot-file initializer loads and configures the tool before application code runs (Ruby's require+configure pattern, Elastic Python's middleware). Request-path code is untouched.
Attach
ElasticAPM(app) Flask middleware + instrument()
Relay source
relays/python
Ran at
10 Nov 2026, 08:25 UTC
Harness
9b99070 · measured in backtest-elastic-python-6.14.0
Raw JSON
6.14.0.json → variants[id = "elastic-python"]

Libraries

confluent-kafka2.15.0
flask3.1.3
grpcio1.83.1
rabbitmqpika 1.4.4
requests2.34.2

Configuration

Library defaults: no propagation-related environment set.

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-c1583346,team=alpha
ot-baggage-routing-key rk-c1583346
traceparent 00-714547847853128a51c165ffed1fcb8b-0fbf7506a80a3bb0-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--df85e12c

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
connection keep-alive
content-length 50
content-type application/json
elastic-apm-traceparent 00-714547847853128a51c165ffed1fcb8b-f60fdf54e58ae7c1-01
traceparent 00-714547847853128a51c165ffed1fcb8b-f60fdf54e58ae7c1-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--df85e12c
raw statuses
baggage=absenttracestate=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-261261fc,team=alpha
ot-baggage-routing-key rk-261261fc
traceparent 00-7ee42193a063c39019abfefe9fb19eac-cfe6876749f5a924-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--6bd14f42

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-7ee42193a063c39019abfefe9fb19eac-59617fc2e4d0d52d-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--6bd14f42
raw statuses
baggage=absenttracestate=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-acd69bbc,team=alpha
ot-baggage-routing-key rk-acd69bbc
traceparent 00-342a2e8f4c6451fbfabd6a5a2f473d9a-48901e589b1a2f05-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--dd7ab334

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--dd7ab334
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound HTTP request headers

baggage routing-key=rk-b1c6ead4,team=alpha
ot-baggage-routing-key rk-b1c6ead4
traceparent 00-143ad32fa895bf8f218c0af9c79c0458-e9a7ba5771b7dca5-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--6d8df96e

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

No headers observed.

test id
elastic-python--http-rabbitmq--6d8df96e
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-8b44bbf6,team=alpha
ot-baggage-routing-key rk-8b44bbf6
traceparent 00-cf94187efa949a7c9c2d1d2c7e973392-4d0cab1cfd8cacba-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--3930a06a

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
connection keep-alive
content-length 50
content-type application/json
elastic-apm-traceparent 00-cf94187efa949a7c9c2d1d2c7e973392-f4dfd8f3fe4d4323-01
traceparent 00-cf94187efa949a7c9c2d1d2c7e973392-f4dfd8f3fe4d4323-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--3930a06a
raw statuses
baggage=absenttracestate=present_entry_losttraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-e34a06f8,team=alpha
ot-baggage-routing-key rk-e34a06f8
traceparent 00-dfbdf6bfb7a85e7a1f3fe4f0ea5e0c09-b226af209c44a1b1-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--e2820042

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-dfbdf6bfb7a85e7a1f3fe4f0ea5e0c09-b8757b756a9ee700-01
tracestate tracestate
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--e2820042
raw statuses
baggage=absenttracestate=present_entry_losttraceparent=same_traceot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-cfbfb6bf,team=alpha
ot-baggage-routing-key rk-cfbfb6bf
traceparent 00-013be48fd6a6bbd8d4a48d480aee5815-5dd38e993ed0379d-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--6cff242a

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--6cff242a
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound gRPC metadata

baggage routing-key=rk-d14b5039,team=alpha
ot-baggage-routing-key rk-d14b5039
traceparent 00-903ba80ece548226dd440ec407fad9c4-cbd0c163e990469d-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--9be5c5a4

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--9be5c5a4
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-655f85c7,team=alpha
ot-baggage-routing-key rk-655f85c7
traceparent 00-3036f7392837bbe2b81a56caa47866ba-9f1cff81cfe3f25b-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--dace6e6f

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
connection keep-alive
content-length 51
content-type application/json
user-agent python-requests/2.34.2
test id
elastic-python--kafka-http--dace6e6f
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage undelivered

Error: observe: no observation within 45s

Seeded on the inbound Kafka record headers

baggage routing-key=rk-91a8f239,team=alpha
ot-baggage-routing-key rk-91a8f239
traceparent 00-955e731d13b3f78bb3c7d6ed3c03118f-e4cfd7a0005afd6e-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--c90b2f83

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
elastic-python--kafka-grpc--c90b2f83
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound Kafka record headers

baggage routing-key=rk-d39c3fc8,team=alpha
ot-baggage-routing-key rk-d39c3fc8
traceparent 00-eaa185c7e2e60d0d4499a5d9c58181f9-ee2b69b8c4d3f5fb-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--96161a55

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--96161a55
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq

Seeded on the inbound Kafka record headers

baggage routing-key=rk-8533953c,team=alpha
ot-baggage-routing-key rk-8533953c
traceparent 00-70b9cd423dce13b109566b23e9f90016-56bcb65faa1bddd2-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--152859d9

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--152859d9
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_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-88976f97,team=alpha
ot-baggage-routing-key rk-88976f97
traceparent 00-b29c85a05f8965bf22ed8339ee19c2d7-36ccff70de5bd3ed-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--2d662ab5

Observed at the sink on the outbound HTTP request headers

accept */*
accept-encoding gzip, deflate
connection keep-alive
content-length 54
content-type application/json
user-agent python-requests/2.34.2
test id
elastic-python--rabbitmq-http--2d662ab5
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
RabbitMQ gRPC baggage tracestate traceparent ot-baggage undelivered

Error: observe: no observation within 45s

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-f3b7828b,team=alpha
ot-baggage-routing-key rk-f3b7828b
traceparent 00-d3e396e46a319e7308edf190e02b81da-8c8cf5726420dcfb-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--bdc7fb93

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
elastic-python--rabbitmq-grpc--bdc7fb93
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
RabbitMQ Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-5cf26e0e,team=alpha
ot-baggage-routing-key rk-5cf26e0e
traceparent 00-e2124fa2f41cf316ffa7db0641dbce5c-2af59a41aed10a7c-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--5d66e49f

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--5d66e49f
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_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-c7bd86ea,team=alpha
ot-baggage-routing-key rk-c7bd86ea
traceparent 00-3a0ad40121836ab032b3a08c15be1547-e5b4e16e0c0812c8-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--95aef943

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--95aef943
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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