elastic-python

Python init-only elastic-apm6.15.1

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.15.1 6.15.1 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:03 UTC
Harness
9b99070 · measured in backtest-elastic-python-6.15.1
Raw JSON
6.15.1.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-014ad6cd,team=alpha
ot-baggage-routing-key rk-014ad6cd
traceparent 00-c529e6650507b8ea5c863d5586ba91ba-38abd0d8920380e1-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--709d3786

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-c529e6650507b8ea5c863d5586ba91ba-8b1bea835cdb4ba5-01
traceparent 00-c529e6650507b8ea5c863d5586ba91ba-8b1bea835cdb4ba5-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--709d3786
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-29cfc568,team=alpha
ot-baggage-routing-key rk-29cfc568
traceparent 00-755da4156fc38c856e00dd843492fbae-4a926a7750fc9104-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--7a19bddd

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-755da4156fc38c856e00dd843492fbae-d5265d7e67db8eb7-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--7a19bddd
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-7e682dbd,team=alpha
ot-baggage-routing-key rk-7e682dbd
traceparent 00-5eb672b4fbd0e87a609c0c2a8cfb230d-c7f6c5f655ba6968-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--b6520596

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--b6520596
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-f7ad7605,team=alpha
ot-baggage-routing-key rk-f7ad7605
traceparent 00-9bc7025d50b7e2b47da7474faa1a0ce6-6da78f6b344d7122-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--c8b6a13f

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

No headers observed.

test id
elastic-python--http-rabbitmq--c8b6a13f
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-81fb82ca,team=alpha
ot-baggage-routing-key rk-81fb82ca
traceparent 00-157259a6e0540d8ea0f6300fb5eefdd5-18fd16eb1221b344-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--8500ec74

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-157259a6e0540d8ea0f6300fb5eefdd5-cbf37b9036cd4768-01
traceparent 00-157259a6e0540d8ea0f6300fb5eefdd5-cbf37b9036cd4768-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--8500ec74
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-7c570670,team=alpha
ot-baggage-routing-key rk-7c570670
traceparent 00-fe49f25325de57bebb5e85da5727e507-47a7828ea79799ea-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--8e625d7e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-fe49f25325de57bebb5e85da5727e507-bbc083a2774d6bdc-01
tracestate tracestate
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--8e625d7e
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-b6743dd5,team=alpha
ot-baggage-routing-key rk-b6743dd5
traceparent 00-d762d585a182c053e10da807b1a82d40-fe493e5494ca6d85-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--8484d3f9

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--8484d3f9
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-e05a5c84,team=alpha
ot-baggage-routing-key rk-e05a5c84
traceparent 00-5dabb607c709c15b054ba02776a3bdeb-c01e0acac03794e0-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--34f30ab0

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--34f30ab0
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-42471dce,team=alpha
ot-baggage-routing-key rk-42471dce
traceparent 00-a6af257b74d20ba9f34c24cfd36671b7-7a581c33d53bbe8d-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--7aa35da2

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--7aa35da2
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-0acfb19a,team=alpha
ot-baggage-routing-key rk-0acfb19a
traceparent 00-8ccd9b032cf500a1e81a4cab6b69e9e6-284bb8df550a7889-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--450707eb

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--450707eb
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-a0ed36c8,team=alpha
ot-baggage-routing-key rk-a0ed36c8
traceparent 00-2a2389d5b5d26c202bf4265d848d0e25-94c5db22e9fd51a6-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--82efb8d4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--82efb8d4
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-2f39e093,team=alpha
ot-baggage-routing-key rk-2f39e093
traceparent 00-f1fe7bb37f2af7cef396dfb895c5ed21-d66765470f72bfa6-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--a20f9a53

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--a20f9a53
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-b0e5291e,team=alpha
ot-baggage-routing-key rk-b0e5291e
traceparent 00-e38de5896c035e8eb6558673b666dad6-72bc2ca755a1313f-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--9651dcb9

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--9651dcb9
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-e66bbabd,team=alpha
ot-baggage-routing-key rk-e66bbabd
traceparent 00-82c06ac0faa05463c6885a468e618bed-3a2c11569b2e40b8-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--236c12be

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--236c12be
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-af9bd8ed,team=alpha
ot-baggage-routing-key rk-af9bd8ed
traceparent 00-da76a253339b8dde41e0c2d159dfdf15-34af1f50452d914d-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--fc396f2f

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--fc396f2f
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-60055864,team=alpha
ot-baggage-routing-key rk-60055864
traceparent 00-62f2f0053feaa32def99e07714015ba4-e107a51c38503cac-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--99297f52

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--99297f52
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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