newrelic-java

Java zero-code newrelic-agent9.1.0

attach -javaagent:newrelic.jar

12/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

Not compared with the uninstrumented Java relay (no run on this site measured it on java 25.0.5).

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

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.

16 cells affected

newrelic-no-baggage

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

by-design fixed in 8.25.0 · measured 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.

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

Tracer
com.newrelic.agent.java:newrelic-agent 9.1.0 9.1.0 on maven github
Runtime
java 25.0.5
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
9 Nov 2026, 19:49 UTC
Harness
9b99070 · measured in backtest-newrelic-java-9.1.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
9.1.0.json → variants[id = "newrelic-java"]

Libraries

grpcgrpc-java
http-clientRestTemplate (HttpURLConnection)
kafkaspring-kafka
kafka-clients3.9.2
rabbitmqspring-rabbit (amqp-client 5.25.0)
spring-boot3.5.16

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

Seeded on the inbound HTTP request headers

baggage routing-key=rk-5ed6a989,team=alpha
ot-baggage-routing-key rk-5ed6a989
traceparent 00-b84e84a87b1028d6e8726886ffd9a011-bbaf84877afc75fe-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--8cb4f2c8

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjM3MjgxMywidHgiOiJhN2RhOTY1MDgxMTMzYjAxIiwidGkiOjE3OTQyNTM3NDA3NjAsInR5IjoiQXBwIiwiaWQiOiI1YWJhNTk1YjBhNmIwYmYzIiwidHIiOiJiODRlODRhODdiMTAyOGQ2ZTg3MjY4ODZmZmQ5YTAxMSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-b84e84a87b1028d6e8726886ffd9a011-5aba595b0a6b0bf3-01
tracestate 8478732@nr=0-0-8478732-572444361-5aba595b0a6b0bf3-a7da965081133b01-1-2.372813-1794253740760,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--8cb4f2c8
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-f5bc341a,team=alpha
ot-baggage-routing-key rk-f5bc341a
traceparent 00-c20a9454a36e1ab771973b2358775abc-79c08412c8261317-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--711f741b

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjI4NDA3MiwidHgiOiI1NmJiZjIwOTQ5OWUzMGUwIiwidGkiOjE3OTQyNTM3NDA3NzEsInR5IjoiQXBwIiwiaWQiOiI2NjExNGE1ZmM4YTZmZjgwIiwidHIiOiJjMjBhOTQ1NGEzNmUxYWI3NzE5NzNiMjM1ODc3NWFiYyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-c20a9454a36e1ab771973b2358775abc-66114a5fc8a6ff80-01
tracestate 8478732@nr=0-0-8478732-572444361-66114a5fc8a6ff80-56bbf209499e30e0-1-2.28472-1794253740771,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--711f741b
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-469fb2c6,team=alpha
ot-baggage-routing-key rk-469fb2c6
traceparent 00-4901cb02d0573f5bb2951106c661cce2-dde67d835c6d2ca0-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--b7d02b0e

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--b7d02b0e
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-50d4b387,team=alpha
ot-baggage-routing-key rk-50d4b387
traceparent 00-431f10c71012b665a17fdb39ae41e602-5da44be4b7da85dd-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--a9a74c84

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjQyMjA5NywidHgiOiI5MzBmNjczNjg0NzU4MmE5IiwidGkiOjE3OTQyNTM3NDEzMDIsInR5IjoiQXBwIiwiaWQiOiI5ZTNiMTViZTMwZmVmMjBkIiwidHIiOiI0MzFmMTBjNzEwMTJiNjY1YTE3ZmRiMzlhZTQxZTYwMiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-431f10c71012b665a17fdb39ae41e602-9e3b15be30fef20d-01
tracestate 8478732@nr=0-0-8478732-572444361-9e3b15be30fef20d-930f6736847582a9-1-2.42297-1794253741302,cptest=v1
test id
newrelic-java--http-rabbitmq--a9a74c84
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-4d7f6ac2,team=alpha
ot-baggage-routing-key rk-4d7f6ac2
traceparent 00-7e4fe79674bbd4f4a734338996270f41-ffeab5b1be2a241d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--d16f4b77

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjE5Nzg2LCJ0eCI6ImY2MDRlMjI2N2MxNTg4OTQiLCJ0aSI6MTc5NDI1Mzc0MTM2MiwidHkiOiJBcHAiLCJpZCI6ImY3ZTk4YjdjYTRiN2YyOTMiLCJ0ciI6IjdlNGZlNzk2NzRiYmQ0ZjRhNzM0MzM4OTk2MjcwZjQxIiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-7e4fe79674bbd4f4a734338996270f41-f7e98b7ca4b7f293-01
tracestate 8478732@nr=0-0-8478732-572444361-f7e98b7ca4b7f293-f604e2267c158894-1-2.19786-1794253741362,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--d16f4b77
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-a22e17a6,team=alpha
ot-baggage-routing-key rk-a22e17a6
traceparent 00-4bd027af4c7187a1a144734fcbabf058-1c50be2a5b20992d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--409e84a5

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjIyMjMxMywidHgiOiJjMzM0OWY1NzcyMzRhNjNjIiwidGkiOjE3OTQyNTM3NDE0MTEsInR5IjoiQXBwIiwiaWQiOiI0OTc5OWYwZTdhNDE3MTZkIiwidHIiOiI0YmQwMjdhZjRjNzE4N2ExYTE0NDczNGZjYmFiZjA1OCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-4bd027af4c7187a1a144734fcbabf058-49799f0e7a41716d-01
tracestate 8478732@nr=0-0-8478732-572444361-49799f0e7a41716d-c3349f577234a63c-1-2.222313-1794253741411,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--409e84a5
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-0d411a87,team=alpha
ot-baggage-routing-key rk-0d411a87
traceparent 00-e5f56161f83099893b16d6cd04587407-b8556f2f5db38f5c-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--46198823

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--46198823
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-0ac6efe4,team=alpha
ot-baggage-routing-key rk-0ac6efe4
traceparent 00-57c20d62a3228e5aa93a4f32293437de-3b4a731963cf3305-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--3ee54828

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjAyNTc3OCwidHgiOiJkNDljMzJkOGQ4MjE4MzRkIiwidGkiOjE3OTQyNTM3NDIwMDMsInR5IjoiQXBwIiwiaWQiOiIzM2VmOTczM2E3MzE1NDk0IiwidHIiOiI1N2MyMGQ2MmEzMjI4ZTVhYTkzYTRmMzIyOTM0MzdkZSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-57c20d62a3228e5aa93a4f32293437de-33ef9733a7315494-01
tracestate 8478732@nr=0-0-8478732-572444361-33ef9733a7315494-d49c32d8d821834d-1-2.025778-1794253742003,cptest=v1
test id
newrelic-java--grpc-rabbitmq--3ee54828
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-a230a594,team=alpha
ot-baggage-routing-key rk-a230a594
traceparent 00-b25f59e11aea089e53ad05919d1435d7-34bdd0c4f86c42b4-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--eb18199d

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
test id
newrelic-java--kafka-http--eb18199d
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-958c0ce2,team=alpha
ot-baggage-routing-key rk-958c0ce2
traceparent 00-1fd1f8f0cf3301c61b6b127bf551e610-07220e4a671fed49-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--4ab4c6dd

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.66.0
test id
newrelic-java--kafka-grpc--4ab4c6dd
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-850cbf7d,team=alpha
ot-baggage-routing-key rk-850cbf7d
traceparent 00-d182d9626884a8c6c83bde90e0230e5d-df5dd31a025e5e18-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--0aaadc72

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--0aaadc72
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-09e88a3f,team=alpha
ot-baggage-routing-key rk-09e88a3f
traceparent 00-5b86fb24463c06f38ec76c7032b756ad-ca41cab55c5bc54e-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--b19a39c1

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--b19a39c1
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-4abb12cc,team=alpha
ot-baggage-routing-key rk-4abb12cc
traceparent 00-d1bd8bd436e5485a6117ee759b717909-4ce977b9dbb080da-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--66eb556c

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
test id
newrelic-java--rabbitmq-http--66eb556c
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-c6882b30,team=alpha
ot-baggage-routing-key rk-c6882b30
traceparent 00-c2bafa8be3292b1d3247687b007c28d9-38e7eabd871b27a6-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--e0ecf1df

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.66.0
test id
newrelic-java--rabbitmq-grpc--e0ecf1df
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-439dde00,team=alpha
ot-baggage-routing-key rk-439dde00
traceparent 00-72ff1e1cfc8607b40a94f2829af11744-72733cf1b6245c91-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--304f8c4d

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--304f8c4d
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-d927bdfe,team=alpha
ot-baggage-routing-key rk-d927bdfe
traceparent 00-60931598f6cf48ada85b8d97b68cdbe6-ae12212bbf30d232-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--106461b1

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

No headers observed.

test id
newrelic-java--rabbitmq-rabbitmq--106461b1
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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