newrelic-java

Java zero-code newrelic-agent8.25.1

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.1 8.25.1 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:56 UTC
Harness
9b99070 · measured in backtest-newrelic-java-8.25.1
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
8.25.1.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-4fbc68aa,team=alpha
ot-baggage-routing-key rk-4fbc68aa
traceparent 00-e7c1d513d00f649e8998bfcc7b7811db-ea1d651277d5c8ae-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--de8b3bc7

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjQ2MDQ4NTksInR4IjoiZTFhOWRjYWNiM2YyZTUyZiIsInRpIjoxNzk0MjU0MTYyMzkwLCJ0eSI6IkFwcCIsImlkIjoiZjVjNDA0YjU1OWZiMjNhYyIsInRyIjoiZTdjMWQ1MTNkMDBmNjQ5ZTg5OThiZmNjN2I3ODExZGIiLCJzYSI6dHJ1ZSwiYXAiOiI1NzI0NDQzNjEifSwidiI6WzAsMV19
traceparent 00-e7c1d513d00f649e8998bfcc7b7811db-f5c404b559fb23ac-01
tracestate 8478732@nr=0-0-8478732-572444361-f5c404b559fb23ac-e1a9dcacb3f2e52f-1-1.46486-1794254162390,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--http-http--de8b3bc7
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-9cec88ae,team=alpha
ot-baggage-routing-key rk-9cec88ae
traceparent 00-19203fd7b9757926d6e1f7af4dd029d4-0f744240268ea94b-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--f3b09259

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjA5MzY0OCwidHgiOiIxOGFhOTEzODJiYmNiYWU5IiwidGkiOjE3OTQyNTQxNjI0MDgsInR5IjoiQXBwIiwiaWQiOiI1ZDcxNDM1OGY1ZGQyM2M5IiwidHIiOiIxOTIwM2ZkN2I5NzU3OTI2ZDZlMWY3YWY0ZGQwMjlkNCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-19203fd7b9757926d6e1f7af4dd029d4-5d714358f5dd23c9-01
tracestate 8478732@nr=0-0-8478732-572444361-5d714358f5dd23c9-18aa91382bbcbae9-1-1.093648-1794254162408,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--http-grpc--f3b09259
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-dd1f0155,team=alpha
ot-baggage-routing-key rk-dd1f0155
traceparent 00-45c3fca5523d5e18792e75dce5691b53-fd0ff5753283d35a-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--9baa32b5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--9baa32b5
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-9531f682,team=alpha
ot-baggage-routing-key rk-9531f682
traceparent 00-59582a4a7fbb1f4c82a8b0a80f9a1731-e80ac53455627f62-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--ffd81a9b

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjMyOTcyLCJ0eCI6IjU2ODFjNmMzM2Q1N2VlZGEiLCJ0aSI6MTc5NDI1NDE2MjkyOSwidHkiOiJBcHAiLCJpZCI6ImFjYjhkNzdiNDZjY2FkMDUiLCJ0ciI6IjU5NTgyYTRhN2ZiYjFmNGM4MmE4YjBhODBmOWExNzMxIiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-59582a4a7fbb1f4c82a8b0a80f9a1731-acb8d77b46ccad05-01
tracestate 8478732@nr=0-0-8478732-572444361-acb8d77b46ccad05-5681c6c33d57eeda-1-1.32972-1794254162929,cptest=v1
test id
newrelic-java--http-rabbitmq--ffd81a9b
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-e0401afb,team=alpha
ot-baggage-routing-key rk-e0401afb
traceparent 00-b916b4330d42bc600db28d097a150e53-f63be420fe7d6caf-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--8b09fef6

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjgxOTcyOSwidHgiOiIyN2U3NWE1ZmJmNjhkNmVlIiwidGkiOjE3OTQyNTQxNjM0NjgsInR5IjoiQXBwIiwiaWQiOiI0MTBjM2FkMTkxODNjYjQwIiwidHIiOiJiOTE2YjQzMzBkNDJiYzYwMGRiMjhkMDk3YTE1MGU1MyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-b916b4330d42bc600db28d097a150e53-410c3ad19183cb40-01
tracestate 8478732@nr=0-0-8478732-572444361-410c3ad19183cb40-27e75a5fbf68d6ee-1-1.819729-1794254163468,cptest=v1
user-agent Java/25.0.5
test id
newrelic-java--grpc-http--8b09fef6
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-de142187,team=alpha
ot-baggage-routing-key rk-de142187
traceparent 00-8b27de6da9bcaf6bb2f0360545325f68-456f038d89283f13-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--692f018d

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjc4NDY4LCJ0eCI6Ijk4YTZlYWM5MWNmMjUzZjYiLCJ0aSI6MTc5NDI1NDE2MzUyNSwidHkiOiJBcHAiLCJpZCI6ImE4NDE1MjI3MGQwNTQ2NTciLCJ0ciI6IjhiMjdkZTZkYTliY2FmNmJiMmYwMzYwNTQ1MzI1ZjY4Iiwic2EiOnRydWUsImFwIjoiNTcyNDQ0MzYxIn0sInYiOlswLDFdfQ==
traceparent 00-8b27de6da9bcaf6bb2f0360545325f68-a84152270d054657-01
tracestate 8478732@nr=0-0-8478732-572444361-a84152270d054657-98a6eac91cf253f6-1-1.78468-1794254163525,cptest=v1
user-agent grpc-java-netty/1.66.0
test id
newrelic-java--grpc-grpc--692f018d
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-f7b920fa,team=alpha
ot-baggage-routing-key rk-f7b920fa
traceparent 00-c5f6290ab50d9afe8cf9b03413f1e0ae-68d2e7ed1fd0d2f7-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--f859241b

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--f859241b
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-cc4d129f,team=alpha
ot-baggage-routing-key rk-cc4d129f
traceparent 00-9051312d44728f65139a9a65b7552aad-6e0c609f76713470-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--398d885e

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoxLjgwMTczMSwidHgiOiI2NjViYTkxZDU2Yjc3MGQ5IiwidGkiOjE3OTQyNTQxNjQxNDIsInR5IjoiQXBwIiwiaWQiOiJiNjgyMmQyMzFiM2RlNzNiIiwidHIiOiI5MDUxMzEyZDQ0NzI4ZjY1MTM5YTlhNjViNzU1MmFhZCIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-9051312d44728f65139a9a65b7552aad-b6822d231b3de73b-01
tracestate 8478732@nr=0-0-8478732-572444361-b6822d231b3de73b-665ba91d56b770d9-1-1.81731-1794254164142,cptest=v1
test id
newrelic-java--grpc-rabbitmq--398d885e
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-ea55f68c,team=alpha
ot-baggage-routing-key rk-ea55f68c
traceparent 00-c052027c222af78d641023dbd07031c8-d258c5dd1ec7343c-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--3c03a6c3

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--3c03a6c3
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-15b9d77d,team=alpha
ot-baggage-routing-key rk-15b9d77d
traceparent 00-b27be96439b976984175d245a50dc2ba-40070424330d39e3-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--bc6950d1

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--bc6950d1
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-bae50fe1,team=alpha
ot-baggage-routing-key rk-bae50fe1
traceparent 00-0d9c5483bd66ab5c35ac236767f2d10a-172512a588cf3a06-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--28bd8bad

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--28bd8bad
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-52dac464,team=alpha
ot-baggage-routing-key rk-52dac464
traceparent 00-4403e3421c7b58d8d305ab69dda905e7-b69b5ad7f3e6f5ac-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--32bf2326

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--32bf2326
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-cd15bd87,team=alpha
ot-baggage-routing-key rk-cd15bd87
traceparent 00-87d93077203a4d8354fcfa0da1596226-8393889e0df115c9-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--0998250d

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--0998250d
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-021633c0,team=alpha
ot-baggage-routing-key rk-021633c0
traceparent 00-a451e390ac501843f808a54548dbae20-3b945f20fc70cd96-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--4224bc9c

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--4224bc9c
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-46b94dc1,team=alpha
ot-baggage-routing-key rk-46b94dc1
traceparent 00-462cce9454619885deedc018e9e338b3-f5ee11efbbb3d29a-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--530da6c9

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--530da6c9
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-50482313,team=alpha
ot-baggage-routing-key rk-50482313
traceparent 00-97841e0a09f0eb5644914e75928f6464-44745aa5aa204303-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--d2ab562b

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

No headers observed.

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

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