newrelic-java

Java zero-code newrelic-agent8.24.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.24.0 8.24.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, 07:42 UTC
Harness
9b99070 · measured in backtest-newrelic-java-8.24.0
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
8.24.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-2152ed91,team=alpha
ot-baggage-routing-key rk-2152ed91
traceparent 00-93d981d0a5ca22c04519fd08cd3f67b1-1d930f00d9696d07-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-http--d6417a90

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--d6417a90
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-55bc6bb3,team=alpha
ot-baggage-routing-key rk-55bc6bb3
traceparent 00-3f22c7be4b03533cd953ad32f0e7ac55-14a99ff5f2be629a-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-grpc--ffc9e22e

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--ffc9e22e
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-4ed431b9,team=alpha
ot-baggage-routing-key rk-4ed431b9
traceparent 00-887e1a336038e14d7bd21d06c5bba594-6dc1cdc379e07690-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-kafka--d787be6c

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--http-kafka--d787be6c
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-e21b257d,team=alpha
ot-baggage-routing-key rk-e21b257d
traceparent 00-cdca867a2b3c1ac6b18129f566f58260-a3a51bd3d7459f4e-01
tracestate cptest=v1
x-cp-canary newrelic-java--http-rabbitmq--da3a0dbe

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

No headers observed.

test id
newrelic-java--http-rabbitmq--da3a0dbe
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-8b3d3e12,team=alpha
ot-baggage-routing-key rk-8b3d3e12
traceparent 00-2131dbc780faa6b22264a433561ec9c9-ad6c8dcc923829e9-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-http--61727ff0

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--61727ff0
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-3c6eb3f4,team=alpha
ot-baggage-routing-key rk-3c6eb3f4
traceparent 00-5a7c964fa1999a2ec902c756e85208a7-94005675645357f8-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-grpc--86b8212d

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--86b8212d
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-9c4c6127,team=alpha
ot-baggage-routing-key rk-9c4c6127
traceparent 00-0e9a94161f6afa7150977822f11b56cb-41afb45cc3da8551-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-kafka--e4e84df2

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--grpc-kafka--e4e84df2
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-a7e5eb1e,team=alpha
ot-baggage-routing-key rk-a7e5eb1e
traceparent 00-4ec00bbb913b5730ffab3c4ff58ba923-81a2d724f7ce07d7-01
tracestate cptest=v1
x-cp-canary newrelic-java--grpc-rabbitmq--e69c5595

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

No headers observed.

test id
newrelic-java--grpc-rabbitmq--e69c5595
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-1da4e386,team=alpha
ot-baggage-routing-key rk-1da4e386
traceparent 00-1134a15b6c8b68d25f9694669062bc46-3e2df2b83683574b-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-http--8294fd85

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--8294fd85
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-6f58e861,team=alpha
ot-baggage-routing-key rk-6f58e861
traceparent 00-86acd2e218f9ed40403f6543ed45902b-c5bad695c09ba210-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-grpc--ec0dedeb

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--ec0dedeb
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-927c6393,team=alpha
ot-baggage-routing-key rk-927c6393
traceparent 00-6c7d1407634d82800d109c49733a8b23-848583f9f8b7ca57-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-kafka--d926f2f4

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--kafka-kafka--d926f2f4
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-59a8c0b2,team=alpha
ot-baggage-routing-key rk-59a8c0b2
traceparent 00-06d740ad26cc2b304efe7c1d87777c69-51ccf4af55367704-01
tracestate cptest=v1
x-cp-canary newrelic-java--kafka-rabbitmq--c181ea64

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

No headers observed.

test id
newrelic-java--kafka-rabbitmq--c181ea64
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-c376caa8,team=alpha
ot-baggage-routing-key rk-c376caa8
traceparent 00-53da0b2915dd2ddc8f8f295fe2875a48-becfee03e0017c0f-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-http--82798aa3

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--82798aa3
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-a7299d1f,team=alpha
ot-baggage-routing-key rk-a7299d1f
traceparent 00-70ec9ebb2bb90f19837a91dcaf908dd0-992a96f7a270f1ad-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-grpc--384759ab

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--384759ab
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-7541722c,team=alpha
ot-baggage-routing-key rk-7541722c
traceparent 00-a7ff2f264e3c8c2955f51abdc1421862-4632aa0b0b0450a0-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-kafka--0cf75c80

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-java--rabbitmq-kafka--0cf75c80
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-14f997ca,team=alpha
ot-baggage-routing-key rk-14f997ca
traceparent 00-dbb12c4a8b0e89904338156378313a9d-97f01366ae40ab3e-01
tracestate cptest=v1
x-cp-canary newrelic-java--rabbitmq-rabbitmq--5ee99658

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

No headers observed.

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

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