newrelic-java

Java zero-code newrelic-agent8.25.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 8.25.0 8.25.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:59 UTC
Harness
9b99070 · measured in backtest-newrelic-java-8.25.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
8.25.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-728230ed,team=alpha
ot-baggage-routing-key rk-728230ed
traceparent 00-ea0657e6de29d37aa0a1fcf78c0bf0df-a7a764731918425e-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--551ddc6b

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjg3Mjk3OCwidHgiOiI0ZTMxZjRmMTQ4YjU0YjdlIiwidGkiOjE3OTQyNTQzODk2NzAsInR5IjoiQXBwIiwiaWQiOiIwMjNkMjY2NTgyNmI3Y2YwIiwidHIiOiJlYTA2NTdlNmRlMjlkMzdhYTBhMWZjZjc4YzBiZjBkZiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-ea0657e6de29d37aa0a1fcf78c0bf0df-023d2665826b7cf0-01
tracestate 8478732@nr=0-0-8478732-572444361-023d2665826b7cf0-4e31f4f148b54b7e-1-1.872978-1794254389670,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--551ddc6b
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-da0c0354,team=alpha
ot-baggage-routing-key rk-da0c0354
traceparent 00-76f3f5445dcf46a1114f3308fb0498c9-195a107041a07e53-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--b9ef1444

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjI0MTAxOSwidHgiOiI4NzYwMzc1ZjQyY2MyOTQ2IiwidGkiOjE3OTQyNTQzODk2ODUsInR5IjoiQXBwIiwiaWQiOiJiODg3YmM1MTAxZTkzYjY0IiwidHIiOiI3NmYzZjU0NDVkY2Y0NmExMTE0ZjMzMDhmYjA0OThjOSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-76f3f5445dcf46a1114f3308fb0498c9-b887bc5101e93b64-01
tracestate 8478732@nr=0-0-8478732-572444361-b887bc5101e93b64-8760375f42cc2946-1-1.24119-1794254389685,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--b9ef1444
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-cb5f804f,team=alpha
ot-baggage-routing-key rk-cb5f804f
traceparent 00-3a9b944139e1e8792fae7016dbc9d6ec-dacc056112a8ac91-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--87fb0dd5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--87fb0dd5
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-1caec652,team=alpha
ot-baggage-routing-key rk-1caec652
traceparent 00-df1cb4055f93b341121aaceba57d3d71-0d84fbe01a5297e0-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--4c14b706

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjY1NzY1MywidHgiOiIyMTkyZWMzYzY0NDVhZTNlIiwidGkiOjE3OTQyNTQzOTAyMDksInR5IjoiQXBwIiwiaWQiOiIyY2Q1MTY4M2IxYjg1MzZiIiwidHIiOiJkZjFjYjQwNTVmOTNiMzQxMTIxYWFjZWJhNTdkM2Q3MSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-df1cb4055f93b341121aaceba57d3d71-2cd51683b1b8536b-01
tracestate 8478732@nr=0-0-8478732-572444361-2cd51683b1b8536b-2192ec3c6445ae3e-1-1.657653-1794254390209,cptest=v1
test id
newrelic-java--http-rabbitmq--4c14b706
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-85122571,team=alpha
ot-baggage-routing-key rk-85122571
traceparent 00-0dbbaeb8b495b7cf6d31423283848aee-4a49371d8cc9ba9d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--1b7b267a

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjc4Njk0OCwidHgiOiI0NDRkNDdhOTA1Njk2M2QxIiwidGkiOjE3OTQyNTQzOTAyMjcsInR5IjoiQXBwIiwiaWQiOiJhODM4ODkzZWU2ZjNmYzUyIiwidHIiOiIwZGJiYWViOGI0OTViN2NmNmQzMTQyMzI4Mzg0OGFlZSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-0dbbaeb8b495b7cf6d31423283848aee-a838893ee6f3fc52-01
tracestate 8478732@nr=0-0-8478732-572444361-a838893ee6f3fc52-444d47a9056963d1-1-1.786948-1794254390227,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--1b7b267a
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-ad42ee28,team=alpha
ot-baggage-routing-key rk-ad42ee28
traceparent 00-80765f8e4b1e41910274b6f4921941a2-897142e5853a2d90-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--50cb02bf

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjI3MzA5NiwidHgiOiI1N2E5MjEyODk2NTQ5ODllIiwidGkiOjE3OTQyNTQzOTAzNzksInR5IjoiQXBwIiwiaWQiOiJkMjY1MzY1MGQ1MzRhOGI1IiwidHIiOiI4MDc2NWY4ZTRiMWU0MTkxMDI3NGI2ZjQ5MjE5NDFhMiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-80765f8e4b1e41910274b6f4921941a2-d2653650d534a8b5-01
tracestate 8478732@nr=0-0-8478732-572444361-d2653650d534a8b5-57a921289654989e-1-1.27396-1794254390379,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--50cb02bf
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-5f776c15,team=alpha
ot-baggage-routing-key rk-5f776c15
traceparent 00-ad418bd80a32a452714bb73c310d1613-cd884001ef015a82-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--65d5fae4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--65d5fae4
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-68788bf1,team=alpha
ot-baggage-routing-key rk-68788bf1
traceparent 00-bd14bdaeaf5019c13a5d4de634c237c9-624ef2907e85d03f-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--6a522e16

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjk2MTIwNjksInR4IjoiZTI4MmUwNDNmMDgzYTVlNiIsInRpIjoxNzk0MjU0MzkwOTU2LCJ0eSI6IkFwcCIsImlkIjoiMjU0YWUwZGJiY2E1MjIxMCIsInRyIjoiYmQxNGJkYWVhZjUwMTljMTNhNWQ0ZGU2MzRjMjM3YzkiLCJzYSI6dHJ1ZSwiYXAiOiI1NzI0NDQzNjEifSwidiI6WzAsMV19
traceparent 00-bd14bdaeaf5019c13a5d4de634c237c9-254ae0dbbca52210-01
tracestate 8478732@nr=0-0-8478732-572444361-254ae0dbbca52210-e282e043f083a5e6-1-1.96127-1794254390956,cptest=v1
test id
newrelic-java--grpc-rabbitmq--6a522e16
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-e1327ba7,team=alpha
ot-baggage-routing-key rk-e1327ba7
traceparent 00-c1acd00bd68b7e754db027e8ae112470-55f8426933f06b15-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--2259a76b

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--2259a76b
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-88972e95,team=alpha
ot-baggage-routing-key rk-88972e95
traceparent 00-24738eaf9dc3b436f5b4f444ea213e09-0fd7259bcee23c9b-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--32af4bd3

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--32af4bd3
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-985de144,team=alpha
ot-baggage-routing-key rk-985de144
traceparent 00-8d5f0ee10c24df3249334bac85d16477-8b62eb7cfc95d396-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--e8c1ccc1

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--e8c1ccc1
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-5afda09c,team=alpha
ot-baggage-routing-key rk-5afda09c
traceparent 00-debeb4a203caccc2f6bc6f95f231f49a-891b27eef6d73fa8-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--71cc347e

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--71cc347e
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-39f0bb41,team=alpha
ot-baggage-routing-key rk-39f0bb41
traceparent 00-a029bfc6a54276cae5f824467ff40052-f0beac5f839bb0e5-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--0039974e

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--0039974e
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-a007c3cb,team=alpha
ot-baggage-routing-key rk-a007c3cb
traceparent 00-f13781de68eda41796d6c71854c27cb5-3bbf6d6919a5ce5e-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--fe2f79f6

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--fe2f79f6
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-f7f0e80a,team=alpha
ot-baggage-routing-key rk-f7f0e80a
traceparent 00-f02c035c86b9c4cd09d0d8c738acad1e-d3613eec86d16337-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--5f4aedd4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--5f4aedd4
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-96ec7990,team=alpha
ot-baggage-routing-key rk-96ec7990
traceparent 00-9ed381ba965802b5c52b76e051577546-234b349bc073f3b1-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--a71ab9dd

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

No headers observed.

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

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