newrelic-java

Java zero-code newrelic-agent9.5.0

attach -javaagent:newrelic.jar

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

New Relic agents carry no W3C baggage on any boundary

by-design Baggage is not part of New Relic's distributed-tracing model (traceparent, tracestate, newrelic); no agent forwards the header and no feature request exists.

New Relic's "How distributed tracing works" defines the complete header model as exactly three headers: traceparent, tracestate and the vendor newrelic header. The seeded W3C baggage member is neither extracted nor re-emitted by any of the seven agents on any of the 16 boundaries, even where trace context continues perfectly (Python is 16/16 for trace context).

An org-wide search for "baggage" across all New Relic agent repositories returns three unrelated hits; no feature request for W3C baggage exists in any of the seven agent repos. New Relic carries no baggage on any protocol; an application that routes on it has to carry the header itself.

104 cells affected

newrelic-no-baggage

New Relic agents continue the trace but set the traceparent sampled flag from their own sampling decision

by-design A New Relic agent takes the trace id from traceparent but decides sampling itself unless an upstream New Relic agent's tracestate entry says otherwise; the flags byte it writes mirrors that decision, not the seeded 01.

Every New Relic pass on traceparent continues the seeded trace id, but the flags byte on the outbound header is the agent's own. The harness seeds 01 (sampled); what comes out is 00 on hops where the agent did not sample the transaction and 01 where it did. The W3C specification allows this: the sampled flag is a hint, and each participant may decide for itself.

New Relic's model carries the decision in its @nr tracestate entry (the sampled and priority fields). When an inbound request has an @nr entry from a trusted account, the agent adopts that decision; the harness seeds no @nr entry, so each agent decides with its own adaptive sampler and writes the result into both the @nr entry and the traceparent flags. Which hops come out 00 therefore varies by agent and by run.

The harness scores traceparent on the trace id only; the flags byte is recorded with each hop but not graded, so these cells pass. A W3C-only service downstream of a New Relic agent sees 00 on every request the agent did not sample, and may treat the trace as unsampled.

63 cells affected

newrelic-traceparent-flags-own-sampling

New Relic Java: Kafka DT header injection is opt-in via a class_transformer setting

config kafka-clients instrumentation is telemetry-only by default; header injection requires enabling the kafka-clients-spans-0.11.0.0 module in newrelic.yml.

On newrelic-agent 9.4.0 with default configuration, every *->kafka leg injects nothing. New Relic's Kafka docs make DT header injection opt-in: class_transformer: com.newrelic.instrumentation.kafka-clients-spans-0.11.0.0: enabled: true, warning that "the instrumentation adds a 150 to 200 byte payload to message headers… we recommend testing… before enabling them in production". The module exists in the agent repository.

The harness has not measured the opt-in, so whether it makes these cells pass is documented, not verified. kafka->kafka and rabbitmq->kafka also fail on the consume side (see newrelic-java-messaging-inbound-never-accepted).

8 cells affected

newrelic-java-kafka-dt-headers-opt-in

New Relic Java: Kafka consumers and spring-rabbit listeners never accept inbound DT headers

open No spring-rabbit module: DT accept runs on the AMQP connection thread, not the listener's thread; the Kafka consumer instrumentation never accepts DT headers.

Every messaging-inbound row fails on newrelic-agent 9.4.0: kafka->* and rabbitmq->* outbound calls carry no headers at all (no transaction is active, so nothing is injected). spring-rabbit publish injects fine (http->rabbitmq, grpc->rabbitmq pass).

Mechanism found in source: the agent has only rabbit-amqp-2.7.0/5.0.0 and spring-kafka modules (no spring-rabbit module at all). DT accept is woven around Consumer.handleDelivery inside a transaction on the AMQP connection thread, while spring-rabbit's listener container processes the message on a different thread, outside that transaction. The Kafka consumer never accepts either.

Workaround: in the listener, start a transaction with the New Relic agent API and accept the message headers into it manually. We found no upstream issue covering either gap.

16 cells affected

newrelic-java-messaging-inbound-never-accepted

Versions in this run

Tracer
com.newrelic.agent.java:newrelic-agent 9.5.0 this version 9.5.0 on maven github
Runtime
java 25.0.5.1
Setup tier
zero-code Runtime attach only: an agent flag, a preload require, the CLR profiler environment, a php.ini extension. No application source involved.
Attach
-javaagent:newrelic.jar
Relay source
relays/java
Ran at
23 Nov 2026, 13:42 UTC
Harness
089dcbd · run run-2026-11-23.3
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
run-2026-11-23.3.json → variants[id = "newrelic-java"]

Libraries

grpcgrpc-java
http-clientRestTemplate (HttpURLConnection)
kafkaspring-kafka
kafka-clients4.2.2
rabbitmqspring-rabbit (amqp-client 5.30.0)
spring-boot4.1.2

Configuration

NEW_RELIC_DISTRIBUTED_TRACING_ENABLEDtrue

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-c980dd47,team=alpha
ot-baggage-routing-key rk-c980dd47
traceparent 00-199c7d0cd1886d5f8d415b8e50fa7594-4cbf0bfb9a5e4b3f-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--2023b818

Observed at the sink on the outbound HTTP request headers

accept text/plain, application/json, application/*+json, */*
connection keep-alive
content-type application/json
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjUzOTM5LCJ0eCI6IjFkMTk1MTNkNmJiNmMwOGIiLCJ0aSI6MTc5NTQ0MTM0Mjc3NiwidHkiOiJBcHAiLCJpZCI6IjdlMDU3NzU1NDRiZmM5YWEiLCJ0ciI6IjE5OWM3ZDBjZDE4ODZkNWY4ZDQxNWI4ZTUwZmE3NTk0Iiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-199c7d0cd1886d5f8d415b8e50fa7594-7e05775544bfc9aa-01
tracestate 8478732@nr=0-0-8478732-572444361--1d19513d6bb6c08b-1-2.53939-1795441342776,cptest=v1
user-agent Java/25.0.5.1
test id
newrelic-java--http-http--2023b818
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP gRPC baggage tracestate traceparent ot-baggage delivered via grpc native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-75c02084,team=alpha
ot-baggage-routing-key rk-75c02084
traceparent 00-780535b670e99abc87bcd967ab3887f7-55c8ce91e08be154-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--eae6f900

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjAwNTM4OSwidHgiOiI2ODA4YjgzYzFiNjFkNTUyIiwidGkiOjE3OTU0NDEzNDI3ODksInR5IjoiQXBwIiwiaWQiOiJiNGVkNzA0ZmQ4YjljODZlIiwidHIiOiI3ODA1MzViNjcwZTk5YWJjODdiY2Q5NjdhYjM4ODdmNyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-780535b670e99abc87bcd967ab3887f7-b4ed704fd8b9c86e-01
tracestate 8478732@nr=0-0-8478732-572444361--6808b83c1b61d552-1-2.005389-1795441342789,cptest=v1
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--http-grpc--eae6f900
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-5d6f595b,team=alpha
ot-baggage-routing-key rk-5d6f595b
traceparent 00-130972347406aea54ae30183955b860e-9b8934554810c91e-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--41900da1

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--41900da1
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-ba4a6764,team=alpha
ot-baggage-routing-key rk-ba4a6764
traceparent 00-1c52fac3d22b943903450bf56b155954-d885d354b066e784-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--e2f5ffcd

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjIxMzE3LCJ0eCI6ImFlNGU4OTU1ZmJlMGU4ZTMiLCJ0aSI6MTc5NTQ0MTM0MzMwNSwidHkiOiJBcHAiLCJpZCI6ImRmZWQyMzYzMDQyZjcyYWMiLCJ0ciI6IjFjNTJmYWMzZDIyYjk0MzkwMzQ1MGJmNTZiMTU1OTU0Iiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-1c52fac3d22b943903450bf56b155954-dfed2363042f72ac-01
tracestate 8478732@nr=0-0-8478732-572444361--ae4e8955fbe0e8e3-1-2.21317-1795441343305,cptest=v1
test id
newrelic-java--http-rabbitmq--e2f5ffcd
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_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-44627d84,team=alpha
ot-baggage-routing-key rk-44627d84
traceparent 00-1622d29b08d0f2d0dec4e88c0b7db631-ca472d7a9b5e216d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--4f99fc0a

Observed at the sink on the outbound HTTP request headers

accept text/plain, application/json, application/*+json, */*
connection keep-alive
content-type application/json
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjE5OTIxNiwidHgiOiJkNjRiNzAyM2U5ODVmMWM5IiwidGkiOjE3OTU0NDEzNDMzMjAsInR5IjoiQXBwIiwiaWQiOiI1NzVmY2U3OGNjMTU2MDUzIiwidHIiOiIxNjIyZDI5YjA4ZDBmMmQwZGVjNGU4OGMwYjdkYjYzMSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-1622d29b08d0f2d0dec4e88c0b7db631-575fce78cc156053-01
tracestate 8478732@nr=0-0-8478732-572444361--d64b7023e985f1c9-1-2.199216-1795441343320,cptest=v1
user-agent Java/25.0.5.1
test id
newrelic-java--grpc-http--4f99fc0a
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-59c12002,team=alpha
ot-baggage-routing-key rk-59c12002
traceparent 00-63fb5878ba4373d7ed257b2ed12afd9d-fa2574b93408177d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--8f6451ce

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjQ2NzcyMiwidHgiOiJlMzlkYzdiZjVjOWM5MGRiIiwidGkiOjE3OTU0NDEzNDMzOTMsInR5IjoiQXBwIiwiaWQiOiJjNjhmNDNlOTM3NzlhMTIwIiwidHIiOiI2M2ZiNTg3OGJhNDM3M2Q3ZWQyNTdiMmVkMTJhZmQ5ZCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-63fb5878ba4373d7ed257b2ed12afd9d-c68f43e93779a120-01
tracestate 8478732@nr=0-0-8478732-572444361--e39dc7bf5c9c90db-1-2.467722-1795441343393,cptest=v1
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--grpc-grpc--8f6451ce
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-8b6751ac,team=alpha
ot-baggage-routing-key rk-8b6751ac
traceparent 00-aa19d79f03c4c090b8aad5daf73d969a-6429d46632e230d7-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--52dff3c5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--52dff3c5
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-f25860e4,team=alpha
ot-baggage-routing-key rk-f25860e4
traceparent 00-366d0377bcc7422d4c06762903a53f77-b7aa2224a5069934-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--a2bc7c77

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjAzOTgzMSwidHgiOiJlNTRhYWFjYWQyNTE2YzVkIiwidGkiOjE3OTU0NDEzNDQxMTYsInR5IjoiQXBwIiwiaWQiOiIzMzQ3ODM0ZjI5ZjgzMmMyIiwidHIiOiIzNjZkMDM3N2JjYzc0MjJkNGMwNjc2MjkwM2E1M2Y3NyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-366d0377bcc7422d4c06762903a53f77-3347834f29f832c2-01
tracestate 8478732@nr=0-0-8478732-572444361--e54aaacad2516c5d-1-2.039831-1795441344116,cptest=v1
test id
newrelic-java--grpc-rabbitmq--a2bc7c77
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-c0021786,team=alpha
ot-baggage-routing-key rk-c0021786
traceparent 00-3c1a650e19e418935401d3b42904b48a-e26d16988f35c2ad-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--9e2be186

Observed at the sink on the outbound HTTP request headers

accept text/plain, application/json, application/*+json, */*
connection keep-alive
content-type application/json
user-agent Java/25.0.5.1
test id
newrelic-java--kafka-http--9e2be186
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-9230ffd5,team=alpha
ot-baggage-routing-key rk-9230ffd5
traceparent 00-cd89d636b9b32e619b878fc8daea1e21-69bd0df76cbad175-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--040295ad

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--kafka-grpc--040295ad
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-013942ac,team=alpha
ot-baggage-routing-key rk-013942ac
traceparent 00-73b72708fa56e6142c2ba09cca1d3b16-9542b6c455eb777e-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--d99331cd

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--d99331cd
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-190b0168,team=alpha
ot-baggage-routing-key rk-190b0168
traceparent 00-dc2c0108ea6895999b3ecae0993940c1-7290e13b9ec729b2-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--ecae6ccc

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--ecae6ccc
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-d605179a,team=alpha
ot-baggage-routing-key rk-d605179a
traceparent 00-2393c1549136150202baf297a85a8c97-98fa7aebdddecbd0-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--7ed84e32

Observed at the sink on the outbound HTTP request headers

accept text/plain, application/json, application/*+json, */*
connection keep-alive
content-type application/json
user-agent Java/25.0.5.1
test id
newrelic-java--rabbitmq-http--7ed84e32
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-e8b38341,team=alpha
ot-baggage-routing-key rk-e8b38341
traceparent 00-5d839fb969b6cdd6a469895fa634a247-7d359fc1c4bf6505-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--07278d17

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--rabbitmq-grpc--07278d17
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-5639f35d,team=alpha
ot-baggage-routing-key rk-5639f35d
traceparent 00-3983fcaf1f49b97a38cd0c88440cbfe1-d75d6a83a683793e-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--920d60af

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--920d60af
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-9f37dd28,team=alpha
ot-baggage-routing-key rk-9f37dd28
traceparent 00-6c0324543ed1733a22a5990c2b535412-3b43326464c37c61-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--4fc3df06

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

No headers observed.

test id
newrelic-java--rabbitmq-rabbitmq--4fc3df06
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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