newrelic-java

Java zero-code newrelic-agent9.2.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.2.0 9.2.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:45 UTC
Harness
9b99070 · measured in backtest-newrelic-java-9.2.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
9.2.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-47867d5b,team=alpha
ot-baggage-routing-key rk-47867d5b
traceparent 00-e5a05653bccadaac43c8cadc0d081d8b-86debe0380d1d0e3-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--bb4411f7

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjgzMTE5NywidHgiOiJmNDg0OWE2MzE0YmI5NGNlIiwidGkiOjE3OTQyNTM1Mjk1ODYsInR5IjoiQXBwIiwiaWQiOiI5OGQ1NTkwNDg4MjEwMjA0IiwidHIiOiJlNWEwNTY1M2JjY2FkYWFjNDNjOGNhZGMwZDA4MWQ4YiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-e5a05653bccadaac43c8cadc0d081d8b-98d5590488210204-01
tracestate 8478732@nr=0-0-8478732-572444361-98d5590488210204-f4849a6314bb94ce-1-2.831197-1794253529585,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--bb4411f7
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-09400df8,team=alpha
ot-baggage-routing-key rk-09400df8
traceparent 00-5b9c4d33093312c06983e37eaf430558-9c7f71d4092e3bb1-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--81a1af0e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjUwOTQzNywidHgiOiJiOThlNDU5YjFlMDY0ZGYxIiwidGkiOjE3OTQyNTM1Mjk2MDQsInR5IjoiQXBwIiwiaWQiOiI4YjNmNzBjMjY0NDJkOWU4IiwidHIiOiI1YjljNGQzMzA5MzMxMmMwNjk4M2UzN2VhZjQzMDU1OCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-5b9c4d33093312c06983e37eaf430558-8b3f70c26442d9e8-01
tracestate 8478732@nr=0-0-8478732-572444361-8b3f70c26442d9e8-b98e459b1e064df1-1-2.59437-1794253529604,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--81a1af0e
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-2cee1628,team=alpha
ot-baggage-routing-key rk-2cee1628
traceparent 00-ea9d29b2582c85e815bb8eaf64a662af-69b0bdfbce1392b3-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--34a787cd

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--34a787cd
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-64956470,team=alpha
ot-baggage-routing-key rk-64956470
traceparent 00-69644a5762139a723ac04980c31b7b2b-eb3f8af3211bc6ea-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--32a9ca02

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjgwODI2MSwidHgiOiJiN2UyZGIyMWM3ZWY3NzZmIiwidGkiOjE3OTQyNTM1MzAxMjksInR5IjoiQXBwIiwiaWQiOiJmMGY1NjI5M2M2MjgzM2Q0IiwidHIiOiI2OTY0NGE1NzYyMTM5YTcyM2FjMDQ5ODBjMzFiN2IyYiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-69644a5762139a723ac04980c31b7b2b-f0f56293c62833d4-01
tracestate 8478732@nr=0-0-8478732-572444361-f0f56293c62833d4-b7e2db21c7ef776f-1-2.88261-1794253530129,cptest=v1
test id
newrelic-java--http-rabbitmq--32a9ca02
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-109bcbaf,team=alpha
ot-baggage-routing-key rk-109bcbaf
traceparent 00-becb19ee896bee250b84583390f6d90e-087ae245c328b48b-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--02e071ed

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjYyNzA1LCJ0eCI6IjNjMDBlZDQ2NGJmYmI3YTEiLCJ0aSI6MTc5NDI1MzUzMDY0NiwidHkiOiJBcHAiLCJpZCI6IjgzYzQ2Njk5OGI5ZDYwNjMiLCJ0ciI6ImJlY2IxOWVlODk2YmVlMjUwYjg0NTgzMzkwZjZkOTBlIiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-becb19ee896bee250b84583390f6d90e-83c466998b9d6063-01
tracestate 8478732@nr=0-0-8478732-572444361-83c466998b9d6063-3c00ed464bfbb7a1-1-2.62750-1794253530645,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--02e071ed
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-e0ff52db,team=alpha
ot-baggage-routing-key rk-e0ff52db
traceparent 00-b6c8924ba033a1d7ca7b03b8ae8e7652-208e960878168e1e-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--110209ec

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjE4MjYxMSwidHgiOiI0N2ZiMzNhMTE2Y2RkZWJjIiwidGkiOjE3OTQyNTM1MzA3NzEsInR5IjoiQXBwIiwiaWQiOiJlMjIyNzllMmZlNjQyMmEzIiwidHIiOiJiNmM4OTI0YmEwMzNhMWQ3Y2E3YjAzYjhhZThlNzY1MiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-b6c8924ba033a1d7ca7b03b8ae8e7652-e22279e2fe6422a3-01
tracestate 8478732@nr=0-0-8478732-572444361-e22279e2fe6422a3-47fb33a116cddebc-1-2.182611-1794253530771,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--110209ec
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-285eff06,team=alpha
ot-baggage-routing-key rk-285eff06
traceparent 00-7d2bdac1f34573d97c16857250f41397-51191a510c7c226d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--e43ff3b5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--e43ff3b5
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-fe9204db,team=alpha
ot-baggage-routing-key rk-fe9204db
traceparent 00-153c6ac473874045ea2ee8598a2fe081-488adcd563151b82-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--fb36fefe

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjIwMzU5NiwidHgiOiIxNThmMDg1YjllNmU2MzFmIiwidGkiOjE3OTQyNTM1MzE0NzYsInR5IjoiQXBwIiwiaWQiOiI5MzAxMTQ1YjZjZTM0ODYwIiwidHIiOiIxNTNjNmFjNDczODc0MDQ1ZWEyZWU4NTk4YTJmZTA4MSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-153c6ac473874045ea2ee8598a2fe081-9301145b6ce34860-01
tracestate 8478732@nr=0-0-8478732-572444361-9301145b6ce34860-158f085b9e6e631f-1-2.23596-1794253531476,cptest=v1
test id
newrelic-java--grpc-rabbitmq--fb36fefe
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-056ec481,team=alpha
ot-baggage-routing-key rk-056ec481
traceparent 00-cbf4434cebeb28901a0a3bae98e02575-356fb71274025ae1-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--cf492a89

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--cf492a89
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-04b64f87,team=alpha
ot-baggage-routing-key rk-04b64f87
traceparent 00-ef146ed745097c803684be18cdd28b38-3fed9e12937536db-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--785f8eed

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--785f8eed
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-35b55e0f,team=alpha
ot-baggage-routing-key rk-35b55e0f
traceparent 00-03d0dd3e991afcdcbfff82d2949c473b-ababdd856fa685be-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--4eaad3de

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--4eaad3de
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-925ef064,team=alpha
ot-baggage-routing-key rk-925ef064
traceparent 00-7c95378d8c482b8fff10ed2a73535c0a-2d35043027f758ce-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--26ec76cb

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--26ec76cb
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-89743fc3,team=alpha
ot-baggage-routing-key rk-89743fc3
traceparent 00-b784043c246673cdd1addc52c3f9e64f-eda1dd110973265d-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--188db3a9

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--188db3a9
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-104e3f6d,team=alpha
ot-baggage-routing-key rk-104e3f6d
traceparent 00-14cb5983705b05bb183137e3f3b102c8-2e2fc3db588cead5-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--0329effa

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--0329effa
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-003b27e9,team=alpha
ot-baggage-routing-key rk-003b27e9
traceparent 00-1c63773daf5a4e4107334a9a343500be-8296c8225e09f283-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--dac3c958

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--dac3c958
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-8c2d69b6,team=alpha
ot-baggage-routing-key rk-8c2d69b6
traceparent 00-fa281ef225600cb0279f9f591af1c0a4-47d4e9928138a905-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--4b7d62f4

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

No headers observed.

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

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