otel-php

PHP zero-code opentelemetry (ext)open-telemetry/sdk 1.15.0 (ext-opentelemetry 1.2.1)

attach ext-opentelemetry + auto-* packages via php.ini

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

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

80 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; no issue proposes instrumenting ext-grpc client calls (filing candidate). 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.

30 cells affected

php-grpc-client-not-instrumented

OpenTelemetry, Elastic APM and New Relic never implemented the OpenTracing-era ot-baggage-* headers

by-design ot-baggage-* is a legacy OpenTracing convention; OpenTelemetry, Elastic APM and New Relic each define their propagation header set without it.

The seeded ot-baggage-routing-key header is ignored — neither extracted nor re-emitted — by every OpenTelemetry, Elastic and New Relic variant on every delivered boundary. None of these tools ever emitted the OpenTracing header format: OpenTelemetry standardised on W3C baggage; 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.

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.

356 cells affected

ot-baggage-not-implemented

OTel PHP: rdkafka producev() injection silently no-ops unless the $headers argument is present

config ext-opentelemetry drops arguments a pre-hook adds to a native function call, so the rdkafka instrumentation's injected $headers never reach producev().

The ExtRdKafka instrumentation does set $params[4] (the $headers slot) from its pre-hook unconditionally. But the ext-opentelemetry extension silently drops arguments added to internal functions ever since argument expansion was disabled to prevent a segfault (PR #84, formalised in PR #120; original crash opentelemetry-php #1155). A naive producev($partition, 0, $payload) therefore gets no headers at all, while producev($partition, 0, $payload, null, []) — an explicit empty array — makes injection (baggage included) work. Verified empirically both ways; the drop produced no error_log line in our runs.

Escape hatch, documented only in the extension repo's README: opentelemetry.allow_stack_extension=On. With that ini set, the naive call injects traceparent, tracestate and baggage and http->kafka / kafka->kafka flip to pass (run archived at results/experiments/otel-php-allow-stack-extension.json). Neither the argument requirement nor the ini setting is mentioned in the ExtRdKafka README.

Consume-side rdkafka extraction is correct (kafka->http passes) — this asymmetry is outbound-only. No upstream issue exists — filing candidate against open-telemetry/opentelemetry-php.

6 cells affected

otel-php-rdkafka-producev-headers-argument

OTel PHP: no php-amqplib instrumentation exists, so every RabbitMQ leg loses context

open opentelemetry-php-contrib has no instrumentation for php-amqplib; its only AMQP coverage is the PECL ext-amqp client, a different library.

The opentelemetry-php-contrib instrumentation tree has no PhpAmqpLib entry. Its only AMQP coverage is ExtAmqp (the PECL ext-amqp client), and even there consumers are manual by design. Nothing is injected on *->rabbitmq, and nothing is extracted on rabbitmq->*; where the outbound HTTP client is instrumented (rabbitmq->http) it injects a fresh trace.

Consumer hooks are structurally hard in PHP (opentelemetry-php #937: "You cannot hook an anonymous function, only methods" — consume callbacks are closures).

Workaround: use the OTel PHP propagator API to inject into the message's application headers on publish and extract/attach in the consume callback. No upstream feature request for php-amqplib exists — filing candidate (php-amqplib is the dominant PHP AMQP client).

18 cells affected

otel-php-amqplib-not-instrumented

Versions in this run

Tracer
opentelemetry open-telemetry/sdk 1.15.0 (ext-opentelemetry 1.2.1) pecl github
Runtime
php 8.3.33
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
ext-opentelemetry + auto-* packages via php.ini
Relay source
relays/php
Ran at
7 Sept 2026, 10:51 UTC
Harness
commit not recorded · run run-2026-09-07
Raw JSON
run-2026-09-07.json → variants[id = "otel-php"]

Libraries

grpcext-grpc 1.83.1 / 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

OTEL_LOGS_EXPORTERnone
OTEL_METRICS_EXPORTERnone
OTEL_PHP_AUTOLOAD_ENABLEDtrue
OTEL_PROPAGATORStracecontext,baggage
OTEL_SERVICE_NAMErelay-otel-php
OTEL_TRACES_EXPORTERnone

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-eeb8395b,team=alpha
ot-baggage-routing-key rk-eeb8395b
traceparent 00-ffe5848f8e855cc7af6f5ce826018757-5428bf853cc29d53-01
tracestate cptest=v1
x-cp-canary otel-php--http-http--782dcec2

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-eeb8395b,team=alpha
content-length 43
content-type application/json
traceparent 00-ffe5848f8e855cc7af6f5ce826018757-b7928b077a150b07-01
tracestate cptest=v1
test id
otel-php--http-http--782dcec2
raw statuses
baggage=propagatedtracestate=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-d312b31c,team=alpha
ot-baggage-routing-key rk-d312b31c
traceparent 00-1e853d21b20370207f3803d9f23fe149-62a1ab8e4a702b0c-01
tracestate cptest=v1
x-cp-canary otel-php--http-grpc--6a093ec3

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.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-php--http-grpc--6a093ec3
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-6e8b1b1f,team=alpha
ot-baggage-routing-key rk-6e8b1b1f
traceparent 00-3e24d0bee0c4f3c683215f55b8260ad9-69d836ee4617ce4f-01
tracestate cptest=v1
x-cp-canary otel-php--http-kafka--cf23ad97

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-php--http-kafka--cf23ad97
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-46e8aac9,team=alpha
ot-baggage-routing-key rk-46e8aac9
traceparent 00-93bfc89733277842dc14cabc409dc773-7246203b312fbc72-01
tracestate cptest=v1
x-cp-canary otel-php--http-rabbitmq--e08139c4

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

No headers observed.

test id
otel-php--http-rabbitmq--e08139c4
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 192.168.117.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-4c9208f4,team=alpha
ot-baggage-routing-key rk-4c9208f4
traceparent 00-64cac5cef439f8404748135dc4393ef6-60b8e09f68b246ef-01
tracestate cptest=v1
x-cp-canary otel-php--grpc-http--d6747162

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
otel-php--grpc-http--d6747162
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 192.168.117.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-123e37c5,team=alpha
ot-baggage-routing-key rk-123e37c5
traceparent 00-626aef811a082200df1941103d3dd96d-bac888a20d34daac-01
tracestate cptest=v1
x-cp-canary otel-php--grpc-grpc--98d8547c

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
otel-php--grpc-grpc--98d8547c
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 192.168.117.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-784997bc,team=alpha
ot-baggage-routing-key rk-784997bc
traceparent 00-17651845dcf3824625528b5621ad87e5-0e7d12fe50e42fa5-01
tracestate cptest=v1
x-cp-canary otel-php--grpc-kafka--4b65d842

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
otel-php--grpc-kafka--4b65d842
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 192.168.117.5:8081: connect: connection refused"

Seeded on the inbound gRPC metadata

baggage routing-key=rk-0b439f61,team=alpha
ot-baggage-routing-key rk-0b439f61
traceparent 00-1f81b6baeabe9763287f16c18fa94a23-4cd2811b30dc5751-01
tracestate cptest=v1
x-cp-canary otel-php--grpc-rabbitmq--086276ac

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

Nothing reached the sink.

test id
otel-php--grpc-rabbitmq--086276ac
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-ab6eaa0c,team=alpha
ot-baggage-routing-key rk-ab6eaa0c
traceparent 00-baff15d2ee1354b7cddae158e8d1cd1f-7d3fbfa7088dd70e-01
tracestate cptest=v1
x-cp-canary otel-php--kafka-http--4140fc09

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-ab6eaa0c,team=alpha
content-length 44
content-type application/json
traceparent 00-baff15d2ee1354b7cddae158e8d1cd1f-eefd72ba947ab173-01
tracestate cptest=v1
test id
otel-php--kafka-http--4140fc09
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-9663fb82,team=alpha
ot-baggage-routing-key rk-9663fb82
traceparent 00-898c271705681eb7bdf9f8d2b7ec8416-cd752b0b7308412a-01
tracestate cptest=v1
x-cp-canary otel-php--kafka-grpc--34f5399a

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.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-php--kafka-grpc--34f5399a
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-86067d5e,team=alpha
ot-baggage-routing-key rk-86067d5e
traceparent 00-631c2373770d74bdbcf45369d47efa80-2c09e1eb37593082-01
tracestate cptest=v1
x-cp-canary otel-php--kafka-kafka--f81955f5

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-php--kafka-kafka--f81955f5
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-1ef0f36a,team=alpha
ot-baggage-routing-key rk-1ef0f36a
traceparent 00-a28affcaa5028b249e430fd866a688c4-c76ea1a992cf63a5-01
tracestate cptest=v1
x-cp-canary otel-php--kafka-rabbitmq--4c92b14b

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

No headers observed.

test id
otel-php--kafka-rabbitmq--4c92b14b
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-33f5fa9c,team=alpha
ot-baggage-routing-key rk-33f5fa9c
traceparent 00-0a22828f0ee31c3d01ba45c0583abc51-6267c5d5ce2362a2-01
tracestate cptest=v1
x-cp-canary otel-php--rabbitmq-http--438d929d

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-8e86de5108ade3de9f7ab93ba207565f-56463814587b3802-01
test id
otel-php--rabbitmq-http--438d929d
raw statuses
baggage=absenttracestate=absenttraceparent=new_traceot_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-06095648,team=alpha
ot-baggage-routing-key rk-06095648
traceparent 00-5e9e36c28651b2b288f18d7b9f954c6e-1805a966f0d9d6d6-01
tracestate cptest=v1
x-cp-canary otel-php--rabbitmq-grpc--55d138ae

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.83.1 grpc-c/56.0.0 (linux; chttp2)
test id
otel-php--rabbitmq-grpc--55d138ae
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-dadb2e28,team=alpha
ot-baggage-routing-key rk-dadb2e28
traceparent 00-fc68a9c523123c35869980c2ec13a235-8b8f9896cd308f90-01
tracestate cptest=v1
x-cp-canary otel-php--rabbitmq-kafka--e69bb495

Observed at the sink on the outbound Kafka record headers

No headers observed.

test id
otel-php--rabbitmq-kafka--e69bb495
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-ad175b1d,team=alpha
ot-baggage-routing-key rk-ad175b1d
traceparent 00-50a11c2d34b0eec68319b3d60fc6fd46-2cce539579170c41-01
tracestate cptest=v1
x-cp-canary otel-php--rabbitmq-rabbitmq--57e516f1

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

No headers observed.

test id
otel-php--rabbitmq-rabbitmq--57e516f1
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent

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