newrelic-java

Java zero-code newrelic-agent9.4.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.4.0 9.4.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, 13:06 UTC
Harness
9beafb3 · measured in run-2026-11-09.3
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
9.4.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-269c2407,team=alpha
ot-baggage-routing-key rk-269c2407
traceparent 00-6b72404b4522bfab750477775b615189-c95f8687fcf4b14d-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--38f3d071

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjc4NDM4OCwidHgiOiJmMmZlNDJmNmEzNTlmNDZhIiwidGkiOjE3OTQyMjk2MDI1NzUsInR5IjoiQXBwIiwiaWQiOiI5NTA0N2I2YWEzNWQyOGYwIiwidHIiOiI2YjcyNDA0YjQ1MjJiZmFiNzUwNDc3Nzc1YjYxNTE4OSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-6b72404b4522bfab750477775b615189-95047b6aa35d28f0-01
tracestate 8478732@nr=0-0-8478732-572444361-95047b6aa35d28f0-f2fe42f6a359f46a-1-2.784388-1794229602575,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--38f3d071
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-3e903300,team=alpha
ot-baggage-routing-key rk-3e903300
traceparent 00-3106cc564089341144c86db311c7e518-63b93306393ec504-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--e43bf9f9

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjA4ODE3OCwidHgiOiIyNGZmYmJlMDk3YmI5YjY1IiwidGkiOjE3OTQyMjk2MDI1ODMsInR5IjoiQXBwIiwiaWQiOiIzMTIxNWM1N2MzYzYwZGVkIiwidHIiOiIzMTA2Y2M1NjQwODkzNDExNDRjODZkYjMxMWM3ZTUxOCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-3106cc564089341144c86db311c7e518-31215c57c3c60ded-01
tracestate 8478732@nr=0-0-8478732-572444361-31215c57c3c60ded-24ffbbe097bb9b65-1-2.088178-1794229602583,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--e43bf9f9
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-38b7bd10,team=alpha
ot-baggage-routing-key rk-38b7bd10
traceparent 00-f9bc71f576355d0da26d779aedc06552-4650fbedc350de88-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--4fa565be

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--4fa565be
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-1fca4582,team=alpha
ot-baggage-routing-key rk-1fca4582
traceparent 00-472e6ce435ce739d3b8acdc52462ee1e-80a93620321b36b8-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--1c26df7d

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjE5MTYyNiwidHgiOiIwNzU1NjA4NzBmMjNmZGIyIiwidGkiOjE3OTQyMjk2MDMxMDUsInR5IjoiQXBwIiwiaWQiOiI2Njc5OTA4MjYyMWQwZjhmIiwidHIiOiI0NzJlNmNlNDM1Y2U3MzlkM2I4YWNkYzUyNDYyZWUxZSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-472e6ce435ce739d3b8acdc52462ee1e-66799082621d0f8f-01
tracestate 8478732@nr=0-0-8478732-572444361-66799082621d0f8f-075560870f23fdb2-1-2.191626-1794229603105,cptest=v1
test id
newrelic-java--http-rabbitmq--1c26df7d
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-831de16e,team=alpha
ot-baggage-routing-key rk-831de16e
traceparent 00-19143a32e5781fb7cf79106ce47778bb-0113f0136807a1aa-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--ee45f9d5

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjEyNTMsInR4IjoiOTZhYzRiMmFkMzkwZWRmYyIsInRpIjoxNzk0MjI5NjAzMTMwLCJ0eSI6IkFwcCIsImlkIjoiOTVkOWFmYmFjYTdlOWNiMSIsInRyIjoiMTkxNDNhMzJlNTc4MWZiN2NmNzkxMDZjZTQ3Nzc4YmIiLCJzYSI6dHJ1ZSwiYXAiOiI1NzI0NDQzNjEifSwidiI6WzAsMV19
traceparent 00-19143a32e5781fb7cf79106ce47778bb-95d9afbaca7e9cb1-01
tracestate 8478732@nr=0-0-8478732-572444361-95d9afbaca7e9cb1-96ac4b2ad390edfc-1-2.1253-1794229603130,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--ee45f9d5
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-8004c9f3,team=alpha
ot-baggage-routing-key rk-8004c9f3
traceparent 00-0160e79d6848e811e7fa987823052950-5fe736ee1bca13ad-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--121905bf

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjI4NzMsInR4IjoiYTcxMmIwN2ZiNjNhNDM2ZCIsInRpIjoxNzk0MjI5NjAzMTQ2LCJ0eSI6IkFwcCIsImlkIjoiMmIzOTdmMDZlMDE3NDQwNCIsInRyIjoiMDE2MGU3OWQ2ODQ4ZTgxMWU3ZmE5ODc4MjMwNTI5NTAiLCJzYSI6dHJ1ZSwiYXAiOiI1NzI0NDQzNjEifSwidiI6WzAsMV19
traceparent 00-0160e79d6848e811e7fa987823052950-2b397f06e0174404-01
tracestate 8478732@nr=0-0-8478732-572444361-2b397f06e0174404-a712b07fb63a436d-1-2.2873-1794229603146,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--121905bf
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-ede299dc,team=alpha
ot-baggage-routing-key rk-ede299dc
traceparent 00-4bea70db7d254f3f511248c8083e2e56-cf870360d7d373b1-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--bf865595

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--bf865595
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-178c8dc0,team=alpha
ot-baggage-routing-key rk-178c8dc0
traceparent 00-d81f7cec8ba19ca917776bd65d3bed75-1991070723d139ad-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--3eed36ea

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjE4NTIwNywidHgiOiJkNzViNGVmNDQyNWU3NzZhIiwidGkiOjE3OTQyMjk2MDM3NzYsInR5IjoiQXBwIiwiaWQiOiJlYTVmNDVmY2U1Y2Y2ZDYxIiwidHIiOiJkODFmN2NlYzhiYTE5Y2E5MTc3NzZiZDY1ZDNiZWQ3NSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-d81f7cec8ba19ca917776bd65d3bed75-ea5f45fce5cf6d61-01
tracestate 8478732@nr=0-0-8478732-572444361-ea5f45fce5cf6d61-d75b4ef4425e776a-1-2.18527-1794229603776,cptest=v1
test id
newrelic-java--grpc-rabbitmq--3eed36ea
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-01edf34b,team=alpha
ot-baggage-routing-key rk-01edf34b
traceparent 00-6fd03069414c370008f2782eb0ee37d9-0fc08fd3a15179a2-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--5140dcea

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--5140dcea
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-d6144157,team=alpha
ot-baggage-routing-key rk-d6144157
traceparent 00-523743f24d739bd75df9bce5397232a0-73d8169a040b0796-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--b8ff2d5f

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--b8ff2d5f
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-73fd3251,team=alpha
ot-baggage-routing-key rk-73fd3251
traceparent 00-ad1b933990047618ee0305aa8130eb4c-fc192727af32ad5c-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--01a2a87d

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--01a2a87d
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-f69d9e42,team=alpha
ot-baggage-routing-key rk-f69d9e42
traceparent 00-eccfb17e70eeb185a24efa66858af2d5-7b914f1bd8f14368-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--dfcd1191

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--dfcd1191
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-15c69b45,team=alpha
ot-baggage-routing-key rk-15c69b45
traceparent 00-cd12a4683ff95ec6622755bc4fa371a4-9b293fa1b65732e5-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--56f50a45

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--56f50a45
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-32e58a9c,team=alpha
ot-baggage-routing-key rk-32e58a9c
traceparent 00-f92b2eccb9e66dadaa89dd8564a61c06-70c443b0f9b9ca51-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--691dc50d

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--691dc50d
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-7ae7ebf4,team=alpha
ot-baggage-routing-key rk-7ae7ebf4
traceparent 00-94e93e7c8b1876d4a8e332c932e8d993-ab16d48850d793b4-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--75d84266

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--75d84266
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-c98eb7e8,team=alpha
ot-baggage-routing-key rk-c98eb7e8
traceparent 00-6ab7660060a2e6f7d4972b065e662946-8bb3d80ee7e92e27-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--72765b86

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

No headers observed.

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

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