newrelic-java

Java zero-code newrelic-agent8.13.0

attach -javaagent:newrelic.jar

0/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.

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

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.13.0 8.13.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
10 Nov 2026, 09:58 UTC
Harness
374f21d · measured in backtest-newrelic-java-8.13.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
8.13.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-5f976eb0,team=alpha
ot-baggage-routing-key rk-5f976eb0
traceparent 00-880a2d325b79e58d872c411ef18b2054-2d6d10e662d037ee-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--a6c9bc4f

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--http-http--a6c9bc4f
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound HTTP request headers

baggage routing-key=rk-d75c3f87,team=alpha
ot-baggage-routing-key rk-d75c3f87
traceparent 00-dc05eb99408b10f42b21bdaa8a2313d3-91c3e50f4802af72-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--c5692516

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--http-grpc--c5692516
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound HTTP request headers

baggage routing-key=rk-de78fdc3,team=alpha
ot-baggage-routing-key rk-de78fdc3
traceparent 00-c3a37b4f5c4a5c32fe7650cfe0d6a9e0-798565cf035e4e31-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--a443febd

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--a443febd
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-247feb98,team=alpha
ot-baggage-routing-key rk-247feb98
traceparent 00-0c78d2047d67869025c1e7b6ca66a6ff-22ab7c341d07fb11-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--5c5e7a37

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

No headers observed.

test id
newrelic-java--http-rabbitmq--5c5e7a37
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound gRPC metadata

baggage routing-key=rk-cbe003e4,team=alpha
ot-baggage-routing-key rk-cbe003e4
traceparent 00-4ed7cc9c0357f9b4601467d1fc06915a-fbe34ad69bd7868f-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--fd87f192

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--grpc-http--fd87f192
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound gRPC metadata

baggage routing-key=rk-1a32f245,team=alpha
ot-baggage-routing-key rk-1a32f245
traceparent 00-1b24349f089543a408109f8dc12ca1d0-d18bd9e0ad3742cd-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--2515f674

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--grpc-grpc--2515f674
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC Kafka baggage tracestate traceparent ot-baggage delivered via kafka

Seeded on the inbound gRPC metadata

baggage routing-key=rk-02f7efe1,team=alpha
ot-baggage-routing-key rk-02f7efe1
traceparent 00-62e5f4d00ee762079b6ab114e0247f84-fbf914976eb8e61f-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--46dbc574

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--46dbc574
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-94352286,team=alpha
ot-baggage-routing-key rk-94352286
traceparent 00-db7ba93fa265e584392467ea29e8da3e-3ffef66e02d2cca1-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--1811447f

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

No headers observed.

test id
newrelic-java--grpc-rabbitmq--1811447f
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-ec71981c,team=alpha
ot-baggage-routing-key rk-ec71981c
traceparent 00-685a5fcb3006377f4b58283368084537-4d44ec330e845f82-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--2fe0c0f1

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--2fe0c0f1
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-560772d9,team=alpha
ot-baggage-routing-key rk-560772d9
traceparent 00-51b22c44ab6bc9c55027291327eceb99-f21ba6c3528f4c4e-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--79edee07

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--79edee07
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-23cf4f24,team=alpha
ot-baggage-routing-key rk-23cf4f24
traceparent 00-1f8b13b7a2113d830af7cef46fb84c98-0da8bc6df018f4f5-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--9bed15ac

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--9bed15ac
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-331c0e54,team=alpha
ot-baggage-routing-key rk-331c0e54
traceparent 00-ab66580923ed22922c68036a67505eeb-8f923e9d7b99500e-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--79298f68

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--79298f68
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-72a27394,team=alpha
ot-baggage-routing-key rk-72a27394
traceparent 00-7d17f1a40bbff055075af5fcefba7b7f-bee9293eb13b60ad-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--2fb256fe

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--2fb256fe
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-4b37cf5e,team=alpha
ot-baggage-routing-key rk-4b37cf5e
traceparent 00-c9d3d315b91eb0cae274f8b190753c71-295674fdedc602d9-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--f5f97fdb

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--f5f97fdb
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-52663129,team=alpha
ot-baggage-routing-key rk-52663129
traceparent 00-0451690251435f55a9a72cd0b5351efc-d162f84193845ba2-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--f7c9444e

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--f7c9444e
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-8064ef26,team=alpha
ot-baggage-routing-key rk-8064ef26
traceparent 00-4131b72a1036a393960e1b8fe290c854-c1dd8e155c383759-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--fed1e295

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

No headers observed.

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

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