newrelic-java

Java zero-code newrelic-agent9.3.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.3.0 9.3.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:41 UTC
Harness
9b99070 · measured in backtest-newrelic-java-9.3.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
9.3.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-1452108b,team=alpha
ot-baggage-routing-key rk-1452108b
traceparent 00-7878a9f2f501605145deebeb72d762d5-d617bd2692be5e09-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--13d53667

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjkxNzUzNiwidHgiOiJhMjFjNTczZjdlZTI5NWY2IiwidGkiOjE3OTQyNTMzMDE0NDcsInR5IjoiQXBwIiwiaWQiOiI4NjAzOWU5YWVhMzEyYWFmIiwidHIiOiI3ODc4YTlmMmY1MDE2MDUxNDVkZWViZWI3MmQ3NjJkNSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-7878a9f2f501605145deebeb72d762d5-86039e9aea312aaf-01
tracestate 8478732@nr=0-0-8478732-572444361-86039e9aea312aaf-a21c573f7ee295f6-1-2.917536-1794253301446,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--13d53667
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-87741dda,team=alpha
ot-baggage-routing-key rk-87741dda
traceparent 00-5d4fcc98021dd1e9e103f5055bf0e80b-12303666afeb706d-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--eb80716e

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjYzOTIzMiwidHgiOiI1YTFjMDVkYjA4YTFhMjViIiwidGkiOjE3OTQyNTMzMDE0NTQsInR5IjoiQXBwIiwiaWQiOiJlZGExY2VkZmIwODVhMjU3IiwidHIiOiI1ZDRmY2M5ODAyMWRkMWU5ZTEwM2Y1MDU1YmYwZTgwYiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-5d4fcc98021dd1e9e103f5055bf0e80b-eda1cedfb085a257-01
tracestate 8478732@nr=0-0-8478732-572444361-eda1cedfb085a257-5a1c05db08a1a25b-1-2.639232-1794253301454,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--eb80716e
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-81a5fc78,team=alpha
ot-baggage-routing-key rk-81a5fc78
traceparent 00-4ab6ef1e174e235cbb4fe9a1e116b17e-e9f8e027d89d057e-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--1c256ec0

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--1c256ec0
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-d1ca7993,team=alpha
ot-baggage-routing-key rk-d1ca7993
traceparent 00-7787cde6a89c48d10867131465d6ba48-b1fc9c3eac631c08-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--be357731

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjc4Njk1NCwidHgiOiJiYjJmNjUxYTkzNjdkYTUzIiwidGkiOjE3OTQyNTMzMDE5NjgsInR5IjoiQXBwIiwiaWQiOiJhZTcwNzA0ZGJmMTE0MDMyIiwidHIiOiI3Nzg3Y2RlNmE4OWM0OGQxMDg2NzEzMTQ2NWQ2YmE0OCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-7787cde6a89c48d10867131465d6ba48-ae70704dbf114032-01
tracestate 8478732@nr=0-0-8478732-572444361-ae70704dbf114032-bb2f651a9367da53-1-2.786954-1794253301968,cptest=v1
test id
newrelic-java--http-rabbitmq--be357731
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-4f56d8e9,team=alpha
ot-baggage-routing-key rk-4f56d8e9
traceparent 00-29b941c315302c00e500d2174b1e7c14-b537b500e44b0b1d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--205e6416

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjQ2ODgyOSwidHgiOiJhYjZiNWQxZTMzOWMxMTNkIiwidGkiOjE3OTQyNTMzMDI1NDEsInR5IjoiQXBwIiwiaWQiOiI2NjZmM2Q5MTMxNGY3NzhiIiwidHIiOiIyOWI5NDFjMzE1MzAyYzAwZTUwMGQyMTc0YjFlN2MxNCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-29b941c315302c00e500d2174b1e7c14-666f3d91314f778b-01
tracestate 8478732@nr=0-0-8478732-572444361-666f3d91314f778b-ab6b5d1e339c113d-1-2.468829-1794253302541,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--205e6416
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-ca8752cf,team=alpha
ot-baggage-routing-key rk-ca8752cf
traceparent 00-3eb61d4c07e2e535fd39747804d720e2-3e0b39bcf1a5fb6c-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--dd191040

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjgwNzgwMywidHgiOiJiNGFlZTNiYjk5MGE1M2U5IiwidGkiOjE3OTQyNTMzMDI2MDYsInR5IjoiQXBwIiwiaWQiOiI5YjRjN2Y0NDhlMDdiMTIxIiwidHIiOiIzZWI2MWQ0YzA3ZTJlNTM1ZmQzOTc0NzgwNGQ3MjBlMiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-3eb61d4c07e2e535fd39747804d720e2-9b4c7f448e07b121-01
tracestate 8478732@nr=0-0-8478732-572444361-9b4c7f448e07b121-b4aee3bb990a53e9-1-2.87803-1794253302606,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--dd191040
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-bb89caf1,team=alpha
ot-baggage-routing-key rk-bb89caf1
traceparent 00-06b2a267aff0d3e1e4fc3d0d30732ce9-73e0f55f79f481c2-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--4c517fa3

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--4c517fa3
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-2823ebc2,team=alpha
ot-baggage-routing-key rk-2823ebc2
traceparent 00-9616f0d3fd71a640fec33a6ae2d00a51-c9575e8697c29f2d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--a373573a

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjY3MzgyOSwidHgiOiI4MTFkYWUwNzE4NzQyYzQ5IiwidGkiOjE3OTQyNTMzMDMxNjMsInR5IjoiQXBwIiwiaWQiOiJlMTI0ZWZmMGMyZDlmZmJjIiwidHIiOiI5NjE2ZjBkM2ZkNzFhNjQwZmVjMzNhNmFlMmQwMGE1MSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-9616f0d3fd71a640fec33a6ae2d00a51-e124eff0c2d9ffbc-01
tracestate 8478732@nr=0-0-8478732-572444361-e124eff0c2d9ffbc-811dae0718742c49-1-2.673829-1794253303163,cptest=v1
test id
newrelic-java--grpc-rabbitmq--a373573a
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-dda192e6,team=alpha
ot-baggage-routing-key rk-dda192e6
traceparent 00-69246ea2c9e68cccab92ab472b0e7fbe-317f571f0c4e3597-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--7045fc55

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--7045fc55
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-35a61b0e,team=alpha
ot-baggage-routing-key rk-35a61b0e
traceparent 00-4d2f383acb3757f718a0041f040832e8-05aad27241642b89-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--4a2f1ad3

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--4a2f1ad3
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-e93dc1fe,team=alpha
ot-baggage-routing-key rk-e93dc1fe
traceparent 00-6ee7fff412b3253b80a0c21b13340a89-90c93b628002038f-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--00a3f58f

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--00a3f58f
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-a6412002,team=alpha
ot-baggage-routing-key rk-a6412002
traceparent 00-c3adabcf5412bc90f950aed6216e52be-a86a7e3c25e29c04-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--7555281a

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--7555281a
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-0fe0551f,team=alpha
ot-baggage-routing-key rk-0fe0551f
traceparent 00-4338cd5b1bf9ce3e056c071eb80bbe38-6a83e05c3937ed62-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--f70cb6f8

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--f70cb6f8
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-3bc91f83,team=alpha
ot-baggage-routing-key rk-3bc91f83
traceparent 00-5edbef0250dc197458067a54918fffdc-be3bf710a5241e09-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--fd75f0e9

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--fd75f0e9
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-badf3652,team=alpha
ot-baggage-routing-key rk-badf3652
traceparent 00-a4b9ba5958719180de5c988a5ba50d16-8c296c910a26e0a8-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--50eced87

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--50eced87
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-93c159ea,team=alpha
ot-baggage-routing-key rk-93c159ea
traceparent 00-784e86fe9389232ae93558b103d94d73-6c8312ea633fd9b1-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--a01f8630

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

No headers observed.

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

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