elastic-python

Python init-only elastic-apm6.26.2

attach ElasticAPM(app) Flask middleware + instrument()

6/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

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). Our references record no upstream issue requesting W3C baggage in these agents.

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

Bonus finding for the same report: the async variant (async_server_interceptor.py) never reads invocation_metadata at all, so the async gRPC server path does not extract trace context, period.

Unreported upstream — filing candidate with the one-line fix (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 in this run

Tracer
elastic-apm 6.26.2 this version 6.26.2 on pypi github
Runtime
python 3.12.14
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
7 Sept 2026, 10:56 UTC
Harness
commit not recorded · run run-2026-09-07
Raw JSON
run-2026-09-07.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-a73584a0,team=alpha
ot-baggage-routing-key rk-a73584a0
traceparent 00-bf8e734817b0d2ad41035cc3514b8153-7743b844df267ff6-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--b7bf5ad3

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-bf8e734817b0d2ad41035cc3514b8153-450d573196fbca19-01
traceparent 00-bf8e734817b0d2ad41035cc3514b8153-450d573196fbca19-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--b7bf5ad3
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-2434710d,team=alpha
ot-baggage-routing-key rk-2434710d
traceparent 00-ebf0f640b126c39924225333658daf64-48ece6d33da73d79-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--0889a015

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-ebf0f640b126c39924225333658daf64-96773c2965a62f1d-01
tracestate cptest=v1
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--0889a015
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-a7db1c67,team=alpha
ot-baggage-routing-key rk-a7db1c67
traceparent 00-a5d80f629c8759ca468250b0d6f23de1-92a230abc48dd166-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--536f4861

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--536f4861
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-043a6661,team=alpha
ot-baggage-routing-key rk-043a6661
traceparent 00-a911a0987c7f1c29d2aadfd9d15a754f-bf18a3911bc474e3-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--5e3b167e

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

No headers observed.

test id
elastic-python--http-rabbitmq--5e3b167e
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-38f2b0a0,team=alpha
ot-baggage-routing-key rk-38f2b0a0
traceparent 00-25e5c8f547641dbfd13324861ef578a6-51f5de9789890e6b-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--25729721

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-25e5c8f547641dbfd13324861ef578a6-10705244dec6fb86-01
traceparent 00-25e5c8f547641dbfd13324861ef578a6-10705244dec6fb86-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--25729721
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-ba4eed37,team=alpha
ot-baggage-routing-key rk-ba4eed37
traceparent 00-525fd6781c6c643bed81769dc61d9c8a-4379eb11c7b2ea7c-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--1018cf5d

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-525fd6781c6c643bed81769dc61d9c8a-453e405e8b021ca4-01
tracestate tracestate
user-agent grpc-python/1.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--1018cf5d
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-858966c0,team=alpha
ot-baggage-routing-key rk-858966c0
traceparent 00-edbd475c818c5775febcd9c797d27d7a-586da7f721a9bbd7-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--e2979469

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--e2979469
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-b79b0eb2,team=alpha
ot-baggage-routing-key rk-b79b0eb2
traceparent 00-00170de27c2357f6eb898c02653be6d3-e3e2007f9a558991-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--c97424d5

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--c97424d5
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-21f9f550,team=alpha
ot-baggage-routing-key rk-21f9f550
traceparent 00-973f085809ca1938a670cae09e2be983-66164d7eccfcda7a-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--72b3aa9e

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--72b3aa9e
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-2b9e7510,team=alpha
ot-baggage-routing-key rk-2b9e7510
traceparent 00-fef655f8c500baa8b029cf284a0c9062-143201f499b8c600-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--d64cacbd

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--d64cacbd
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-9279cf26,team=alpha
ot-baggage-routing-key rk-9279cf26
traceparent 00-9eae121ca989dff8fa7120ec3be82ada-b819c73ee9f26f47-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--c6df4840

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--c6df4840
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-4da78a7d,team=alpha
ot-baggage-routing-key rk-4da78a7d
traceparent 00-742bd1dbcf4fcb41b9aa5946c9f6cabc-f104540d1d522a3b-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--cf703b6d

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--cf703b6d
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-7e6c0c16,team=alpha
ot-baggage-routing-key rk-7e6c0c16
traceparent 00-631d68054e7a395423c92d3c1a190c14-fe43d10aa6af2200-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--e4bef9df

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--e4bef9df
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-747e2e34,team=alpha
ot-baggage-routing-key rk-747e2e34
traceparent 00-2e69ff6ab95e4e058e32e6b1293ea674-437e5c16601f48ba-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--7ddef791

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--7ddef791
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-9b4093b9,team=alpha
ot-baggage-routing-key rk-9b4093b9
traceparent 00-bc9a0cd63fafceac200f7b510a09271c-c7266fb073c739d3-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--8b088f6f

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--8b088f6f
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-515e586d,team=alpha
ot-baggage-routing-key rk-515e586d
traceparent 00-e0a8606adae1f58574371695e2e1d7c4-671b26fbd395b6db-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--7e61d464

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--7e61d464
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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