elastic-python

Python init-only elastic-apm6.26.3

attach python boot_elastic.py (instrument() + ElasticAPM(app) Flask middleware)

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.

216 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.

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

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 in this run

Tracer
elastic-apm 6.26.3 this version 6.26.3 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
python boot_elastic.py (instrument() + ElasticAPM(app) Flask middleware)
Relay source
relays/python
Ran at
23 Nov 2026, 13:41 UTC
Harness
089dcbd · run run-2026-11-23.3
Raw JSON
run-2026-11-23.3.json → variants[id = "elastic-python"]

Libraries

confluent-kafka2.16.1
flask3.1.3
grpcio1.85.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 native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-53c27c04,team=alpha
ot-baggage-routing-key rk-53c27c04
traceparent 00-984c59c36e0b67a9dfe92005e2218cbf-63e86bb2fbe3a197-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--cabd5bd1

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-984c59c36e0b67a9dfe92005e2218cbf-5e07d70b63732936-01
traceparent 00-984c59c36e0b67a9dfe92005e2218cbf-5e07d70b63732936-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--cabd5bd1
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-6aacba42,team=alpha
ot-baggage-routing-key rk-6aacba42
traceparent 00-3eec3f519db540e0306fb31c7245ffb2-3ebb1e14d1691582-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--074c09eb

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-3eec3f519db540e0306fb31c7245ffb2-aead41978f147c00-01
tracestate cptest=v1
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--074c09eb
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-77eaef06,team=alpha
ot-baggage-routing-key rk-77eaef06
traceparent 00-812a562fa338926ad4be16992f8c1d3f-b6c77e55c0c15990-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--351ca89d

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--351ca89d
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-c85bfb23,team=alpha
ot-baggage-routing-key rk-c85bfb23
traceparent 00-fdbd11023bc23ce45215a569bf1a6aa2-0adfd4bbfc8e7c8e-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--1a338d33

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

No headers observed.

test id
elastic-python--http-rabbitmq--1a338d33
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-2d599be3,team=alpha
ot-baggage-routing-key rk-2d599be3
traceparent 00-8fb9acb55607f47e7554b00b4bb6fad1-33803db75d47b098-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--48cd0d63

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-8fb9acb55607f47e7554b00b4bb6fad1-92ba67a884cba2dd-01
traceparent 00-8fb9acb55607f47e7554b00b4bb6fad1-92ba67a884cba2dd-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--48cd0d63
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-30d8e745,team=alpha
ot-baggage-routing-key rk-30d8e745
traceparent 00-e433057482b6f9d5f64e0987edd0e473-2b390f8f2ddca1ae-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--94e541ee

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-e433057482b6f9d5f64e0987edd0e473-bad5ce3408d0efb5-01
tracestate tracestate
user-agent grpc-python/1.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--94e541ee
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-85e243a9,team=alpha
ot-baggage-routing-key rk-85e243a9
traceparent 00-49146c1cd2ec0d36237be50cb651312f-984119b9a926c810-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--cb1831b5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--cb1831b5
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-bb52ce80,team=alpha
ot-baggage-routing-key rk-bb52ce80
traceparent 00-b989333abc01611ea3d2ece0b839d4a4-e7b493571fd6451c-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--7e8c464f

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--7e8c464f
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-23958053,team=alpha
ot-baggage-routing-key rk-23958053
traceparent 00-1ad58a7fa576e3fc8b4c1e6a5a95f380-edcc08eab18807a5-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--28a1dc13

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--28a1dc13
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-354c7f02,team=alpha
ot-baggage-routing-key rk-354c7f02
traceparent 00-55e98a3deb1cdb5b139753945387541f-3b9841971b3141dd-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--e14c3223

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.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--kafka-grpc--e14c3223
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-fc07edd5,team=alpha
ot-baggage-routing-key rk-fc07edd5
traceparent 00-a5309993a4fa0267bf40ecbf1ab74b9f-ebd0bbd49c054f0a-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--1eafa6cd

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--1eafa6cd
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-10689a86,team=alpha
ot-baggage-routing-key rk-10689a86
traceparent 00-b1cd1f98c41698963188c8fc7efb2c72-b78609d296a9a555-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--9c30003d

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--9c30003d
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-0ad391c9,team=alpha
ot-baggage-routing-key rk-0ad391c9
traceparent 00-723dd48e0ffcc8ccd7bc1ed0499c5acc-fcbfd336d9710ffb-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--5ba1d61d

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--5ba1d61d
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-4f945e2b,team=alpha
ot-baggage-routing-key rk-4f945e2b
traceparent 00-a97ace6389e46c56188abd03b36229e8-bcfcebc783ba2290-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--3095c7b6

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.85.1 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--rabbitmq-grpc--3095c7b6
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-0efa4e47,team=alpha
ot-baggage-routing-key rk-0efa4e47
traceparent 00-f9f58d6f255a885efc5a3f42f6336e43-438767c31c066441-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--d6e56cd2

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--d6e56cd2
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-624b3a85,team=alpha
ot-baggage-routing-key rk-624b3a85
traceparent 00-5040757458027afea84afd2395305610-7e135ee3f1560926-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--1f872aac

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--1f872aac
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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