elastic-python

Python init-only elastic-apm6.19.0

attach ElasticAPM(app) Flask middleware + instrument()

6/64 cells pass
  • 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.

16 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.19.0 6.19.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, 07:42 UTC
Harness
9b99070 · measured in backtest-elastic-python-6.19.0
Raw JSON
6.19.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-7415f3c4,team=alpha
ot-baggage-routing-key rk-7415f3c4
traceparent 00-dcbe53b7c26a7bd4d2657ca80d220ff4-42852e1755ef1139-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--1e3f8442

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-dcbe53b7c26a7bd4d2657ca80d220ff4-4b3d5e2ef61933e2-01
traceparent 00-dcbe53b7c26a7bd4d2657ca80d220ff4-4b3d5e2ef61933e2-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--1e3f8442
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-97ae963a,team=alpha
ot-baggage-routing-key rk-97ae963a
traceparent 00-98d95ee83a39699c7881c89253c2fad3-3b467af9c4e4faae-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--115ca944

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-98d95ee83a39699c7881c89253c2fad3-54ea99cab9b70f88-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--115ca944
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-2804ab7c,team=alpha
ot-baggage-routing-key rk-2804ab7c
traceparent 00-874747150a814b7ad85652027bccf1a2-a35e1a539a563b94-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--2bb294e1

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--2bb294e1
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-7c3fd78e,team=alpha
ot-baggage-routing-key rk-7c3fd78e
traceparent 00-9861d083b4e91e350e85e8a5e81041f6-e8dc9c60c33dc489-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--279087d6

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

No headers observed.

test id
elastic-python--http-rabbitmq--279087d6
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-013a7835,team=alpha
ot-baggage-routing-key rk-013a7835
traceparent 00-9c9dae2c604a8dd2b6a9c972625c7f40-118fd4b60253e821-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--6a1fc22c

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-9c9dae2c604a8dd2b6a9c972625c7f40-bb49b1525eef792f-01
traceparent 00-9c9dae2c604a8dd2b6a9c972625c7f40-bb49b1525eef792f-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--6a1fc22c
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-30f7af32,team=alpha
ot-baggage-routing-key rk-30f7af32
traceparent 00-ebf7aeff37b16912a494fc1cd8b348f5-52e66f6d445e0275-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--fa120d90

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-ebf7aeff37b16912a494fc1cd8b348f5-7d951d0c190244d6-01
tracestate tracestate
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--fa120d90
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-c7dfed4e,team=alpha
ot-baggage-routing-key rk-c7dfed4e
traceparent 00-4dc0b6229dd78df75650ee47fd34916d-35966136e5f2655b-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--a0a17871

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--a0a17871
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-6ea920f4,team=alpha
ot-baggage-routing-key rk-6ea920f4
traceparent 00-af101e1e63adbb12aafe090d0a6a6dc3-33d9c1a6c766c8c5-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--d0be1e1b

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--d0be1e1b
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-2a622ab4,team=alpha
ot-baggage-routing-key rk-2a622ab4
traceparent 00-7085df539e48a0a5ad1a3900226f1a74-23201c8191096a0b-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--48294834

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--48294834
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-128e1468,team=alpha
ot-baggage-routing-key rk-128e1468
traceparent 00-2e7ed30a07369e411beb03fe2238beff-82e3ab63e13ababa-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--830aced8

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--kafka-grpc--830aced8
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound Kafka record headers

baggage routing-key=rk-468476cf,team=alpha
ot-baggage-routing-key rk-468476cf
traceparent 00-e7f31beedcd6343e8e25776c7d89556c-3a3802684bf6384e-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--dd5e1475

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--dd5e1475
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-d635bff5,team=alpha
ot-baggage-routing-key rk-d635bff5
traceparent 00-f1ed9c805d088625ddbdd54dfe2d999a-ce187a1b7d66234f-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--fe526780

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--fe526780
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-be7f843d,team=alpha
ot-baggage-routing-key rk-be7f843d
traceparent 00-29084341d922b37da08280a2d2dbbc85-17d9e36c787f0c53-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--691535ac

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--691535ac
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_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-67952ce2,team=alpha
ot-baggage-routing-key rk-67952ce2
traceparent 00-543cad41016b592cdf225fe401e2994c-17ffd0a9384e7a14-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--aa184dd8

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--rabbitmq-grpc--aa184dd8
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_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-c0b53831,team=alpha
ot-baggage-routing-key rk-c0b53831
traceparent 00-6da0d0d06bcd78b42139ec9f83678d71-6bf60e2f0d15470b-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--b64f94a3

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--b64f94a3
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-4379dc20,team=alpha
ot-baggage-routing-key rk-4379dc20
traceparent 00-37a4d83204bcc80f0b84524acd8be623-6b30da120911a83b-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--82eef2f9

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--82eef2f9
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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