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
24 Nov 2026, 14:03 UTC
Harness
bb1ee3e · run run-2026-11-24.2
Raw JSON
run-2026-11-24.2.json → variants[id = "elastic-python"]

Libraries

confluent-kafka2.16.2
flask3.1.3
grpcio1.85.3
rabbitmqpika 1.5.0
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-3bdf0fd2,team=alpha
ot-baggage-routing-key rk-3bdf0fd2
traceparent 00-87d2b3c5e9bfff6e4553bdf3ff128fca-9947c76ad8e32b0a-01
tracestate cptest=v1
x-cp-canary elastic-python--http-http--85ee987a

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-87d2b3c5e9bfff6e4553bdf3ff128fca-48af25c79340ecbf-01
traceparent 00-87d2b3c5e9bfff6e4553bdf3ff128fca-48af25c79340ecbf-01
tracestate cptest=v1
user-agent python-requests/2.34.2
test id
elastic-python--http-http--85ee987a
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-a9a8bb4a,team=alpha
ot-baggage-routing-key rk-a9a8bb4a
traceparent 00-34b6ab6a0cfdb06352a0ee55f40d30a3-04838f86df819935-01
tracestate cptest=v1
x-cp-canary elastic-python--http-grpc--d86ec4bd

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-34b6ab6a0cfdb06352a0ee55f40d30a3-3e5d37fdfca0d8e5-01
tracestate cptest=v1
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--http-grpc--d86ec4bd
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-43cbae5e,team=alpha
ot-baggage-routing-key rk-43cbae5e
traceparent 00-5e7b8745b5a84903172d38cf856ccb2a-12a339b89e5796a9-01
tracestate cptest=v1
x-cp-canary elastic-python--http-kafka--cf94b452

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--http-kafka--cf94b452
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-f5ca4a28,team=alpha
ot-baggage-routing-key rk-f5ca4a28
traceparent 00-87ac0b79b0f3d5932b37219cab20d811-fb4237624ea1080d-01
tracestate cptest=v1
x-cp-canary elastic-python--http-rabbitmq--5d082313

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

No headers observed.

test id
elastic-python--http-rabbitmq--5d082313
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-bbd53c38,team=alpha
ot-baggage-routing-key rk-bbd53c38
traceparent 00-83c535cf70da90ea7f76ecd20ea5165f-16cc51c0a0171f83-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-http--511e5dce

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-83c535cf70da90ea7f76ecd20ea5165f-a931c3136bea412f-01
traceparent 00-83c535cf70da90ea7f76ecd20ea5165f-a931c3136bea412f-01
tracestate tracestate
user-agent python-requests/2.34.2
test id
elastic-python--grpc-http--511e5dce
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-aae451ee,team=alpha
ot-baggage-routing-key rk-aae451ee
traceparent 00-fd0ebd67393feb1db403acfd006a9cf4-571d5792e391a8c4-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-grpc--f651e934

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
traceparent 00-fd0ebd67393feb1db403acfd006a9cf4-78a29bca67905e21-01
tracestate tracestate
user-agent grpc-python/1.85.3 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--grpc-grpc--f651e934
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-79283cd1,team=alpha
ot-baggage-routing-key rk-79283cd1
traceparent 00-c0a99c966b2c8911be4f2c7d361746aa-b02d5ee67ad08464-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-kafka--f89294b0

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--grpc-kafka--f89294b0
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-5060a3cc,team=alpha
ot-baggage-routing-key rk-5060a3cc
traceparent 00-b8326b43afb855c47759ce24314cdb0a-0eae8ceda63309c9-01
tracestate cptest=v1
x-cp-canary elastic-python--grpc-rabbitmq--b2f3b321

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

No headers observed.

test id
elastic-python--grpc-rabbitmq--b2f3b321
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-9e5eb464,team=alpha
ot-baggage-routing-key rk-9e5eb464
traceparent 00-4a01301c79c8635b16d177b093fd9a25-6b3ea68a327e8830-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-http--590b6349

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--590b6349
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-2e8147de,team=alpha
ot-baggage-routing-key rk-2e8147de
traceparent 00-2eb19a57f438c689ff8bb5e6450d8ff8-aae337a2d4198624-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-grpc--0f524fa4

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.3 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--kafka-grpc--0f524fa4
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-1e75e408,team=alpha
ot-baggage-routing-key rk-1e75e408
traceparent 00-97a3080832cc7342915a1b67bd5b4871-78321e191218f6ae-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-kafka--a1cd480e

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--kafka-kafka--a1cd480e
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-0151ebfb,team=alpha
ot-baggage-routing-key rk-0151ebfb
traceparent 00-26ee7e1ccdf162d29c8c55aa2f7295e0-c60b99e0dc760c40-01
tracestate cptest=v1
x-cp-canary elastic-python--kafka-rabbitmq--6534720d

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

No headers observed.

test id
elastic-python--kafka-rabbitmq--6534720d
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-03e1924e,team=alpha
ot-baggage-routing-key rk-03e1924e
traceparent 00-6bdd80709ef30107b75a4332b950d6a4-1c50345c14848955-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-http--280cec60

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--280cec60
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-c3619ce4,team=alpha
ot-baggage-routing-key rk-c3619ce4
traceparent 00-1a2bb4b93aa95a54fee2524c878a537d-81ad1ac472e2f710-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-grpc--515692c8

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.3 grpc-c/58.0.0 (linux; chttp2)
test id
elastic-python--rabbitmq-grpc--515692c8
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-771be7d3,team=alpha
ot-baggage-routing-key rk-771be7d3
traceparent 00-1aa1ec00dd0436504d68f4793c15cff0-225f4829d4e5cbeb-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-kafka--f142a01d

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
elastic-python--rabbitmq-kafka--f142a01d
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-38cc6482,team=alpha
ot-baggage-routing-key rk-38cc6482
traceparent 00-980d16eb86c8a0a1e49bfa045725470a-03ec1b7c67c7e7bc-01
tracestate cptest=v1
x-cp-canary elastic-python--rabbitmq-rabbitmq--847f8b29

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

No headers observed.

test id
elastic-python--rabbitmq-rabbitmq--847f8b29
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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