newrelic-php

PHP zero-code newrelic-php-agent10.20.0.10

attach newrelic-install (newrelic extension + daemon)

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

Not compared with the uninstrumented PHP relay (no run on this site measured it on php 8.3.36).

Explanations

PHP: no gRPC server exists in any tracer-supported topology, so gRPC-inbound is undeliverable

app-limitation The official gRPC PHP implementation is client-only; the harness's Apache mod_php + CLI worker topology cannot accept gRPC calls, so grpc->* hops never run.

grpc.io's PHP quickstart: "You can only create gRPC clients in PHP. Use another language to create a gRPC server." (Restated in grpc/grpc #38481, open, filed by a Google engineer.) PHP can serve gRPC through a separate application server: RoadRunner's gRPC plugin (Go proxy → PHP workers) or Swoole-based frameworks such as Hyperf. But none of the tracers' zero-code instrumentation covers those paths: dd-trace-php's RoadRunner integration hooks the HTTP PSR7Worker only (Datadog's guidance for RoadRunner gRPC is manual dd_trace_method hooks, dd-trace-php #805); OTel has no roadrunner-grpc PHP instrumentation (RoadRunner's otel plugin traces in the Go proxy layer, not the PHP worker); Elastic and New Relic support neither.

The harness measures the documented Apache mod_php + two CLI workers topology, the supported deployment for all three tracers (dd-trace-php does not support php -S), so every grpc->* boundary is undelivered for every PHP variant including the baseline. A RoadRunner-based relay with manual instrumentation is a candidate follow-up (see the roadmap in DESIGN.md).

16 cells affected

php-no-grpc-server

PHP: no tool instruments the ext-grpc client, so every *->grpc leg is header-free

open Neither OTel PHP, dd-trace-php, Elastic PHP nor New Relic PHP hooks ext-grpc + grpc/grpc client calls; no metadata is injected on any *->grpc boundary.

Every *->grpc cell is header-free for otel, datadog, elastic and newrelic alike: the outbound gRPC client (ext-grpc + grpc/grpc) is not on any tool's instrumentation list, so nothing is injected into call metadata.

Datadog: dd-trace-php #916 is the canonical gRPC request, open since 2020 and marked "up-for-grabs" ("We do not have enough bandwidth to work on this integration during this quarter"); gRPC is absent from Datadog's PHP compatibility tables. OpenTelemetry: the opentelemetry-php-contrib instrumentation tree (30 auto-instrumentations) contains no gRPC entry. gRPC exists in the OTel PHP ecosystem only as the OTLP export transport; we found no issue proposing instrumentation of ext-grpc client calls. Elastic and New Relic list ext-grpc as unsupported.

Workaround: add the propagation headers to the call's metadata array yourself at every gRPC call site, using the tool's propagator/inject API.

6 cells affected

php-grpc-client-not-instrumented

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.

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

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

1 cell affected

newrelic-traceparent-flags-own-sampling

New Relic PHP does not instrument rdkafka; Kafka produce injects nothing

open The PHP agent's messaging support is php-amqplib publish only; rdkafka is unsupported, so no headers are injected into produced records.

newrelic-php-agent 12.10.0.39 is 2/16: http->http (curl) and http->rabbitmq (php-amqplib >= 3.7 publish instrumentation, agent >= 11.6) carry all three trace headers. rdkafka is unsupported, so http->kafka injects nothing; kafka->kafka and rabbitmq->kafka additionally fail on the consume side (see newrelic-php-cli-consumers-never-accept).

Docker footgun: newrelic-install symlinks the extension into the extracted tarball directory by default. Deleting the tarball leaves a dangling symlink and a silently uninstrumented app; build with NR_INSTALL_USE_CP_NOT_LN=1.

6 cells affected

newrelic-php-rdkafka-not-supported

New Relic PHP: long-running CLI consumers never accept inbound context

open The PHP agent has no rdkafka consume or php-amqplib consume instrumentation, so the CLI worker processes never start a transaction from message headers.

On newrelic-php-agent 12.10.0.39 every kafka->* and rabbitmq->* leg fails: the long-running CLI consumer workers never accept inbound context, so outbound calls after a consume carry no headers (no transaction is active). php-amqplib coverage is publish-side only, and rdkafka is unsupported entirely.

Workaround: in the consumer loop, start a background transaction with the agent API and accept the message headers manually. We found no upstream issue requesting consume-side support in the PHP agent.

16 cells affected

newrelic-php-cli-consumers-never-accept

Versions measured

Tracer
php_agent 10.20.0.10 reported as newrelic 10.20.0.10 newrelic-download github
Runtime
php 8.3.36
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
newrelic-install (newrelic extension + daemon)
Relay source
relays/php
Ran at
10 Nov 2026, 10:18 UTC
Harness
374f21d · measured in backtest-newrelic-php-10.20.0.10
Requires
NEW_RELIC_LICENSE_KEY
Raw JSON
10.20.0.10.json → variants[id = "newrelic-php"]

Libraries

grpcext-grpc 1.85.0 / grpc/grpc 1.82.0
http_clientext-curl 8.14.1
kafkaext-rdkafka 6.0.5
rabbitmqphp-amqplib v3.7.4
serverapache2 mod_php / slim 4.15.3

Configuration

NEW_RELIC_APP_NAMErelay-newrelic-php
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-bfa0177d,team=alpha
ot-baggage-routing-key rk-bfa0177d
traceparent 00-51ea3023ff631bfb0877926baec8f9a4-1cfe392ff003ea90-01
tracestate cptest=v1
x-cp-canary newrelic-php--http-http--3a5b2e66

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
newrelic eyJ2IjpbMCwxXSwiZCI6eyJ0eSI6IkFwcCIsImFjIjoiODQ3ODczMiIsImFwIjoiNTcyNDEzNDg0IiwiaWQiOiIzYWM3MmQ1NGFhYzQ5Nzg2IiwidHIiOiI1MWVhMzAyM2ZmNjMxYmZiMDg3NzkyNmJhZWM4ZjlhNCIsInR4IjoiZDY3M2MyYTVjNTM0YjIxMyIsInByIjoxLjU5MTYxLCJzYSI6dHJ1ZSwidGkiOjE3OTQzMDU4OTg0NDJ9fQ==
traceparent 00-51ea3023ff631bfb0877926baec8f9a4-3ac72d54aac49786-01
tracestate 8478732@nr=0-0-8478732-572413484-3ac72d54aac49786-d673c2a5c534b213-1-1.591613-1794305898442,cptest=v1
test id
newrelic-php--http-http--3a5b2e66
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-b1950e94,team=alpha
ot-baggage-routing-key rk-b1950e94
traceparent 00-15148db11c0cbfd2db21af624085ef6e-f892e2e0abeeb096-01
tracestate cptest=v1
x-cp-canary newrelic-php--http-grpc--e56a0b6b

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
user-agent grpc-php/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
newrelic-php--http-grpc--e56a0b6b
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-aacd2a6f,team=alpha
ot-baggage-routing-key rk-aacd2a6f
traceparent 00-41cae737f074599d3b26841f90ae1764-5b440fc1afdc206d-01
tracestate cptest=v1
x-cp-canary newrelic-php--http-kafka--8340765d

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-php--http-kafka--8340765d
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-d60c6ce8,team=alpha
ot-baggage-routing-key rk-d60c6ce8
traceparent 00-22f77cd719a4777742c448fc9e0f67fb-4d16bea7d8f3602f-01
tracestate cptest=v1
x-cp-canary newrelic-php--http-rabbitmq--e597a9d9

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

No headers observed.

test id
newrelic-php--http-rabbitmq--e597a9d9
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
gRPC HTTP baggage tracestate traceparent ot-baggage undelivered

Error: send: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 172.18.0.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-29cab075,team=alpha
ot-baggage-routing-key rk-29cab075
traceparent 00-c2ffe5d24db2441cba27637b0a20d2ab-6869d716749c727e-01
tracestate cptest=v1
x-cp-canary newrelic-php--grpc-http--855d6441

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
newrelic-php--grpc-http--855d6441
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
gRPC gRPC baggage tracestate traceparent ot-baggage undelivered

Error: send: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 172.18.0.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-cbc88f73,team=alpha
ot-baggage-routing-key rk-cbc88f73
traceparent 00-51d8fa5ca8049438c7c69ea69b5c67f0-9f76d04a00ff6d68-01
tracestate cptest=v1
x-cp-canary newrelic-php--grpc-grpc--658d936f

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
newrelic-php--grpc-grpc--658d936f
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
gRPC Kafka baggage tracestate traceparent ot-baggage undelivered

Error: send: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 172.18.0.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-2f0503f1,team=alpha
ot-baggage-routing-key rk-2f0503f1
traceparent 00-8b67443ef7f1ef1abdfdc8d9bbe7e540-84090779cfdf49ba-01
tracestate cptest=v1
x-cp-canary newrelic-php--grpc-kafka--c1fe422d

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
newrelic-php--grpc-kafka--c1fe422d
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
gRPC RabbitMQ baggage tracestate traceparent ot-baggage undelivered

Error: send: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp 172.18.0.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-2047ee9d,team=alpha
ot-baggage-routing-key rk-2047ee9d
traceparent 00-5539984b3c85c9b327e4ef80edf5e429-d67a86450afeb42b-01
tracestate cptest=v1
x-cp-canary newrelic-php--grpc-rabbitmq--caa133df

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

Nothing reached the sink.

test id
newrelic-php--grpc-rabbitmq--caa133df
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http

Seeded on the inbound Kafka record headers

baggage routing-key=rk-84d48e85,team=alpha
ot-baggage-routing-key rk-84d48e85
traceparent 00-95913ec6a123550213e953dda0de1911-a1b36ed43b06c4af-01
tracestate cptest=v1
x-cp-canary newrelic-php--kafka-http--27a67b62

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 48
content-type application/json
test id
newrelic-php--kafka-http--27a67b62
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-b62e15e1,team=alpha
ot-baggage-routing-key rk-b62e15e1
traceparent 00-b2f4c43890773e0ba45f4b0fcf9cb041-a78c2674a9c32818-01
tracestate cptest=v1
x-cp-canary newrelic-php--kafka-grpc--177dfde0

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
user-agent grpc-php/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
newrelic-php--kafka-grpc--177dfde0
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-d097beae,team=alpha
ot-baggage-routing-key rk-d097beae
traceparent 00-6d153102d789c5c605c892cd65a24dc7-f5dce3d52e076913-01
tracestate cptest=v1
x-cp-canary newrelic-php--kafka-kafka--a37b8313

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-php--kafka-kafka--a37b8313
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-60740fa0,team=alpha
ot-baggage-routing-key rk-60740fa0
traceparent 00-3beb229456e287d13ecb6994ec6b57f5-ab47aee673699d19-01
tracestate cptest=v1
x-cp-canary newrelic-php--kafka-rabbitmq--99972a8c

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

No headers observed.

test id
newrelic-php--kafka-rabbitmq--99972a8c
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-96211104,team=alpha
ot-baggage-routing-key rk-96211104
traceparent 00-f7d89c0cf360ec88473212f6bc0ee5a5-421a9e4deaa5dc6f-01
tracestate cptest=v1
x-cp-canary newrelic-php--rabbitmq-http--4c58231a

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 51
content-type application/json
test id
newrelic-php--rabbitmq-http--4c58231a
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-7e2a4b4a,team=alpha
ot-baggage-routing-key rk-7e2a4b4a
traceparent 00-63ac93af12a9ab311c871559f883bbd9-d6e9779b0ad78b48-01
tracestate cptest=v1
x-cp-canary newrelic-php--rabbitmq-grpc--c8f75efe

Observed at the sink on the outbound gRPC metadata

:authority sink:9081
content-type application/grpc
grpc-accept-encoding identity, deflate, gzip
user-agent grpc-php/1.85.0 grpc-c/58.0.0 (linux; chttp2)
test id
newrelic-php--rabbitmq-grpc--c8f75efe
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-58e1601c,team=alpha
ot-baggage-routing-key rk-58e1601c
traceparent 00-26ef4173b01cd34c345b6fba1c42a145-752aec46718be197-01
tracestate cptest=v1
x-cp-canary newrelic-php--rabbitmq-kafka--1754ffb7

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
newrelic-php--rabbitmq-kafka--1754ffb7
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-d2301ea7,team=alpha
ot-baggage-routing-key rk-d2301ea7
traceparent 00-84d81abf6b0061b2b971b3d12c70ccd2-4c2ea096426e156b-01
tracestate cptest=v1
x-cp-canary newrelic-php--rabbitmq-rabbitmq--a61fca33

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

No headers observed.

test id
newrelic-php--rabbitmq-rabbitmq--a61fca33
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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