newrelic-java

Java zero-code newrelic-agent9.5.0

attach -javaagent:newrelic.jar

12/64 cells pass
  • Pass
  • Partial
  • New trace
  • Fail
  • Undelivered
  • Not run

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.

216 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.

104 cells affected

newrelic-no-baggage

New Relic agents continue the trace but set the traceparent sampled flag from their own sampling decision

by-design 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.

63 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 in this run

Tracer
com.newrelic.agent.java:newrelic-agent 9.5.0 this version 9.5.0 on maven github
Runtime
java 25.0.5.1
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
24 Nov 2026, 13:39 UTC
Harness
0ce08fa · run run-2026-11-24.3
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
run-2026-11-24.3.json → variants[id = "newrelic-java"]

Libraries

grpcgrpc-java
http-clientRestTemplate (HttpURLConnection)
kafkaspring-kafka
kafka-clients4.4.0
rabbitmqspring-rabbit (amqp-client 5.37.1)
spring-boot4.2.0

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 native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-e62e8024,team=alpha
ot-baggage-routing-key rk-e62e8024
traceparent 00-031de16aef980f06317e7eea88165d47-f291bd11639f189d-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--46785996

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjk0ODg0MiwidHgiOiI5NWIzYmVkMTA5MWZiNTExIiwidGkiOjE3OTU1Mjc1NDYyMjMsInR5IjoiQXBwIiwiaWQiOiJkZTgxOWU1ZDJlMTNjNjJkIiwidHIiOiIwMzFkZTE2YWVmOTgwZjA2MzE3ZTdlZWE4ODE2NWQ0NyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-031de16aef980f06317e7eea88165d47-de819e5d2e13c62d-01
tracestate 8478732@nr=0-0-8478732-572444361--95b3bed1091fb511-1-2.948842-1795527546223,cptest=v1
user-agent Java/25.0.5.1
test id
newrelic-java--http-http--46785996
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
HTTP gRPC baggage tracestate traceparent ot-baggage delivered via grpc native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-87ebb80b,team=alpha
ot-baggage-routing-key rk-87ebb80b
traceparent 00-c5088dbc37222c8d520836e09f0d7ea2-036a8bf27d3d83c5-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--6e60e1e0

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjQ3Mzg0MywidHgiOiJlZjQ2YzE4NDMwYWY5ODJjIiwidGkiOjE3OTU1Mjc1NDYyMzgsInR5IjoiQXBwIiwiaWQiOiI5NDQ2MmRiNmY3ODBmNjNlIiwidHIiOiJjNTA4OGRiYzM3MjIyYzhkNTIwODM2ZTA5ZjBkN2VhMiIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-c5088dbc37222c8d520836e09f0d7ea2-94462db6f780f63e-01
tracestate 8478732@nr=0-0-8478732-572444361--ef46c18430af982c-1-2.473843-1795527546238,cptest=v1
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--http-grpc--6e60e1e0
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-44893307,team=alpha
ot-baggage-routing-key rk-44893307
traceparent 00-ca9d9f0def1c7e7ae8b088d346734ea6-423847086afc1b9c-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--4b05b4cf

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--4b05b4cf
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-6cff9bc3,team=alpha
ot-baggage-routing-key rk-6cff9bc3
traceparent 00-b29567750ae2c8089f471d7af6064983-7877c7fa5291cfeb-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--5a60515f

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjgzNTU1MiwidHgiOiI1NzU4NTY3N2UxYjJhYjkwIiwidGkiOjE3OTU1Mjc1NDY3NjQsInR5IjoiQXBwIiwiaWQiOiIwYTVjOTdjMjE3NjE5YTcwIiwidHIiOiJiMjk1Njc3NTBhZTJjODA4OWY0NzFkN2FmNjA2NDk4MyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-b29567750ae2c8089f471d7af6064983-0a5c97c217619a70-01
tracestate 8478732@nr=0-0-8478732-572444361--57585677e1b2ab90-1-2.835552-1795527546764,cptest=v1
test id
newrelic-java--http-rabbitmq--5a60515f
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-b250ea99,team=alpha
ot-baggage-routing-key rk-b250ea99
traceparent 00-3ea96a116cea8a94afa4b8cfcbbbc113-1a8e859130ce71a7-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--0ea60f5d

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 eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjY3NDQzMSwidHgiOiJhNWFkM2NmN2NkOTQ0NWMzIiwidGkiOjE3OTU1Mjc1NDY3NzUsInR5IjoiQXBwIiwiaWQiOiIzZjMxOTk0YjI4YTE1NzRhIiwidHIiOiIzZWE5NmExMTZjZWE4YTk0YWZhNGI4Y2ZjYmJiYzExMyIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-3ea96a116cea8a94afa4b8cfcbbbc113-3f31994b28a1574a-01
tracestate 8478732@nr=0-0-8478732-572444361--a5ad3cf7cd9445c3-1-2.674431-1795527546775,cptest=v1
user-agent Java/25.0.5.1
test id
newrelic-java--grpc-http--0ea60f5d
raw statuses
baggage=absenttracestate=preservedtraceparent=same_traceot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-b99b5b18,team=alpha
ot-baggage-routing-key rk-b99b5b18
traceparent 00-cf0321a39e206b9836b1926c6ad0ea04-0d0bd73d26a716b9-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--166471fa

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding gzip
newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjk5MTA4MzEsInR4IjoiY2M4OGExYTczNjk2MzI0NSIsInRpIjoxNzk1NTI3NTQ2Nzk0LCJ0eSI6IkFwcCIsImlkIjoiNTk2ZDMyYmUwNmRkZTM2ZSIsInRyIjoiY2YwMzIxYTM5ZTIwNmI5ODM2YjE5MjZjNmFkMGVhMDQiLCJzYSI6dHJ1ZSwiYXAiOiI1NzI0NDQzNjEifSwidiI6WzAsMV19
traceparent 00-cf0321a39e206b9836b1926c6ad0ea04-596d32be06dde36e-01
tracestate 8478732@nr=0-0-8478732-572444361--cc88a1a736963245-1-2.99183-1795527546794,cptest=v1
user-agent grpc-java-netty/1.85.1
test id
newrelic-java--grpc-grpc--166471fa
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-1f7e2622,team=alpha
ot-baggage-routing-key rk-1f7e2622
traceparent 00-0105552ba986a6fb824ada41dc1e514a-d9a0c9490c40f36d-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--7fb872f3

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--7fb872f3
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_same_trace

Seeded on the inbound gRPC metadata

baggage routing-key=rk-3114308b,team=alpha
ot-baggage-routing-key rk-3114308b
traceparent 00-6c4d9ed30f2f3e4e863bd2d4a0126075-67b28aff1ab12a7f-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--d04d24da

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

newrelic eyJkIjp7ImFjIjoiODQ3ODczMiIsInByIjoyLjA5NTU2NywidHgiOiI5Zjg4NjMwYzIwNmFmMjUzIiwidGkiOjE3OTU1Mjc1NDczMTQsInR5IjoiQXBwIiwiaWQiOiIwMDE5MDg3ZjBjOGEyODk3IiwidHIiOiI2YzRkOWVkMzBmMmYzZTRlODYzYmQyZDRhMDEyNjA3NSIsInNhIjp0cnVlLCJhcCI6IjU3MjQ0NDM2MSJ9LCJ2IjpbMCwxXX0=
traceparent 00-6c4d9ed30f2f3e4e863bd2d4a0126075-0019087f0c8a2897-01
tracestate 8478732@nr=0-0-8478732-572444361--9f88630c206af253-1-2.095567-1795527547314,cptest=v1
test id
newrelic-java--grpc-rabbitmq--d04d24da
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-69323db5,team=alpha
ot-baggage-routing-key rk-69323db5
traceparent 00-267ca771dec331e5ce6265110aa82495-149840fa3c320e0a-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--7aa114c6

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.1
test id
newrelic-java--kafka-http--7aa114c6
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-6f38f09a,team=alpha
ot-baggage-routing-key rk-6f38f09a
traceparent 00-57514f1543234c5c0d757960fe6623ff-f90a640001ed286f-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--7b9cf5a2

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.85.1
test id
newrelic-java--kafka-grpc--7b9cf5a2
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-9e50e72a,team=alpha
ot-baggage-routing-key rk-9e50e72a
traceparent 00-1f7d18b767a7f6490479be38ddd0e2c1-0c2bb3b75ae09f7a-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--55ba0807

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--55ba0807
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-48abf30c,team=alpha
ot-baggage-routing-key rk-48abf30c
traceparent 00-7aee443271588ea83199b6a8470aefe2-f50cd370488e8d25-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--75510fe2

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--75510fe2
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-55f9a006,team=alpha
ot-baggage-routing-key rk-55f9a006
traceparent 00-84109390eb6c30a31dacf1c081995c8e-18a93588de396b8a-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--1b9db08c

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.1
test id
newrelic-java--rabbitmq-http--1b9db08c
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-98d9e644,team=alpha
ot-baggage-routing-key rk-98d9e644
traceparent 00-1fda186c734fdfa1a3a0ef27b07a9e5a-f472c82f97259aaf-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--c028345c

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.85.1
test id
newrelic-java--rabbitmq-grpc--c028345c
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-5afd0894,team=alpha
ot-baggage-routing-key rk-5afd0894
traceparent 00-91e9304714295200917b1d281eacf720-fa27a95e169c9a83-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--1a230f61

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--1a230f61
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-61ac8cd3,team=alpha
ot-baggage-routing-key rk-61ac8cd3
traceparent 00-d1a08a01ce48694d093f1e772be631ab-824e4908f14a56cd-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--fac9a53c

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

No headers observed.

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

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