datadog-php

PHP zero-code dd-trace-php2.0.0

attach datadog-setup.php installer (ddtrace extension)

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

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.

9 cells affected

php-grpc-client-not-instrumented

dd-trace .NET, Ruby, Rust and PHP do not emit the legacy ot-baggage-* headers

by-design ot-baggage-* is undocumented legacy behaviour of dd-trace java/js/go; .NET never had it, Ruby removed it with OpenTracing, Rust and PHP do not emit it.

dd-trace-java, dd-trace-js and dd-trace-go carry ot-baggage-* across all 16 boundaries; these four tracers ignore the seeded header (not extracted, not re-emitted). Datadog's propagation reference lists the styles datadog, tracecontext, b3single, b3multi, baggage, none; ot-baggage appears nowhere, so the headers the first group emits are legacy behaviour of their datadog style rather than a configurable format.

Per tracer: dd-trace-rb removed OpenTracing (and with it ot-baggage-*) in 2.0 (PR #3443; maintainer confirmation in #4055; W3C baggage landed later in 2.13.0 via #4493/#4505). dd-trace-dotnet never had it: a code search for ot-baggage returns zero results. datadog-opentelemetry (Rust) has no ot-baggage-* style. dd-trace-php can emit ot-baggage-* in some configurations (#3614, nginx rejecting ot-baggage-true-client-ip), so "never emits" would overstate, but at 1.25.0 with the harness configuration it measured absent on every delivered boundary.

The values still flow via W3C baggage wherever that header works for the same tracer.

12 cells affected

datadog-ot-baggage-not-implemented

dd-trace-php closes the rdkafka consume span inside consume(), before user code runs

open The Kafka consume hook attaches the extracted headers to a span it closes before returning the message, so outbound calls run outside the extracted context.

Kafka injection works on dd-trace-php 1.25.0 (*->kafka passes, baggage included), but the rdkafka consume side does not continue context: kafka->* starts a new trace and baggage is gone. The mechanism is visible in KafkaIntegration.php: the consume hook opens a new trace root, attaches the extracted headers to that span, and calls close_span() inside the consume() call itself, before application code ever sees the message.

DD_TRACE_KAFKA_DISTRIBUTED_TRACING defaults to true (configuration.h), so the gap is the scoping, not the flag. The historical rdkafka request (#639) was never closed after injection shipped.

Workaround: read the record headers after consume() returns and continue the trace from them manually before outbound calls. Upstream fix: keep the consume span (and the extracted context) active until the application has processed the message. We found no upstream issue reporting that consumed Kafka context does not reach post-consume user code.

12 cells affected

datadog-php-rdkafka-consume-span-closed-early

Versions measured

Tracer
DataDog/dd-trace-php 2.0.0 reported as ddtrace 2.0.0 2.0.0 on github-releases github
Runtime
php 8.5.13
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
datadog-setup.php installer (ddtrace extension)
Relay source
relays/php
Ran at
30 Nov 2026, 18:58 UTC
Harness
ae4b9c9 · measured in run-2026-11-30.1
Raw JSON
2.0.0.json → variants[id = "datadog-php"]

Libraries

grpcext-grpc 1.85.4 / grpc/grpc 1.85.4
http_clientext-curl 8.14.1
kafkaext-rdkafka 6.0.5
rabbitmqphp-amqplib v3.7.5
serverapache2 mod_php / slim 4.15.3

Configuration

DD_INSTRUMENTATION_TELEMETRY_ENABLEDfalse
DD_REMOTE_CONFIG_ENABLEDfalse
DD_SERVICErelay-datadog-php
DD_TRACE_PROPAGATION_STYLEdatadog,tracecontext,baggage
DD_TRACE_STARTUP_LOGSfalse

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-235d5a45,team=alpha
ot-baggage-routing-key rk-235d5a45
traceparent 00-bbfbcb901984d51d23d03c8a4eb0117c-58f271124f67918a-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--90e6c9dd

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-235d5a45,team=alpha
content-length 46
content-type application/json
traceparent 00-bbfbcb901984d51d23d03c8a4eb0117c-5e914f9521710be0-01
tracestate dd=p:5e914f9521710be0;t.dm:-0,cptest=v1
x-datadog-parent-id 6814315213118049248
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=bbfbcb901984d51d,_dd.p.dm=-0
x-datadog-trace-id 2580629151206609276
test id
datadog-php--http-http--90e6c9dd
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-4f83387a,team=alpha
ot-baggage-routing-key rk-4f83387a
traceparent 00-aa0241746f712b368e63290d66e40297-f487f3945cbfe41e-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--da702a7e

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.4 grpc-c/58.0.0 (linux; chttp2)
test id
datadog-php--http-grpc--da702a7e
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
HTTP Kafka baggage tracestate traceparent ot-baggage delivered via kafka native: present_same_trace

Seeded on the inbound HTTP request headers

baggage routing-key=rk-c622f7e5,team=alpha
ot-baggage-routing-key rk-c622f7e5
traceparent 00-d5c6218ed496538a06b0e4d0e9169406-f3dac6a5a6ddc634-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--73ed8616

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-c622f7e5,team=alpha
traceparent 00-d5c6218ed496538a06b0e4d0e9169406-68aa66256b913b11-01
tracestate dd=p:68aa66256b913b11;t.dm:-0,cptest=v1
x-datadog-parent-id 7541952836889819921
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=d5c6218ed496538a,_dd.p.dm=-0
x-datadog-trace-id 482136746043544582
test id
datadog-php--http-kafka--73ed8616
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_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-91db2d74,team=alpha
ot-baggage-routing-key rk-91db2d74
traceparent 00-69e3d11131152a3c9da998db2c7a06aa-4aa8cb7eb509106d-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--140c4e91

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

baggage routing-key=rk-91db2d74,team=alpha
traceparent 00-69e3d11131152a3c9da998db2c7a06aa-71a93a7fd01fee33-01
tracestate dd=p:71a93a7fd01fee33;t.dm:-0,cptest=v1
x-datadog-parent-id 8190141717976968755
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=69e3d11131152a3c,_dd.p.dm=-0
x-datadog-trace-id 11360779602130241194
test id
datadog-php--http-rabbitmq--140c4e91
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_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-294d07fb,team=alpha
ot-baggage-routing-key rk-294d07fb
traceparent 00-c97611d7350a421e6acc3eeeb9bd3b7a-92a1693c3d79b6b0-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--8d4787b7

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--8d4787b7
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-29c7787f,team=alpha
ot-baggage-routing-key rk-29c7787f
traceparent 00-6782d875effdbb017a08f397e7751c1f-078c7c75cbeb1401-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--36755d2c

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--36755d2c
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-f04421f4,team=alpha
ot-baggage-routing-key rk-f04421f4
traceparent 00-2f028ba5d04e2b489b64d4103712d1fb-6c284bc2f6ad1ea9-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--24f7e836

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--24f7e836
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-d7cf4401,team=alpha
ot-baggage-routing-key rk-d7cf4401
traceparent 00-5aca5f74c87cb94ccd712a9317138df6-d5014aa1b50b9d4b-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--9b69af57

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--9b69af57
raw statuses
baggage=—tracestate=—traceparent=—ot_baggage=—
Kafka HTTP baggage tracestate traceparent ot-baggage delivered via http native: present_new_trace

Seeded on the inbound Kafka record headers

baggage routing-key=rk-33b52e35,team=alpha
ot-baggage-routing-key rk-33b52e35
traceparent 00-22896db3725c9b27505f6ba1049f36d3-8f50b63d23144f74-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--df4f8d11

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6b0dc750000000009417aa97db0317df-9417aa97db0317df-03
tracestate dd=p:9417aa97db0317df;t.dm:-0,ot=rv:91114bf2a75302;th:0
x-datadog-parent-id 10671185411268876255
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b0dc75000000000,_dd.p.dm=-0
x-datadog-trace-id 10671185411268876255
test id
datadog-php--kafka-http--df4f8d11
raw statuses
baggage=absenttracestate=present_entry_losttraceparent=new_traceot_baggage=absent
Kafka gRPC baggage tracestate traceparent ot-baggage delivered via grpc

Seeded on the inbound Kafka record headers

baggage routing-key=rk-a02f460a,team=alpha
ot-baggage-routing-key rk-a02f460a
traceparent 00-8bd4a2c43ffc2975f75251b0cf654acf-f7554adfb93a24c0-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--136dacaf

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.4 grpc-c/58.0.0 (linux; chttp2)
test id
datadog-php--kafka-grpc--136dacaf
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
Kafka Kafka baggage tracestate traceparent ot-baggage delivered via kafka native: present_new_trace

Seeded on the inbound Kafka record headers

baggage routing-key=rk-e45dcfe1,team=alpha
ot-baggage-routing-key rk-e45dcfe1
traceparent 00-56e72d59d57fe85b5de292a4a1c763b8-81bbb04a79ae7570-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--3e813152

Observed at the sink on the outbound Kafka record headers

traceparent 00-6b0dc75100000000d786c6a5ea5552fd-d786c6a5ea5552fd-03
tracestate dd=p:d786c6a5ea5552fd;t.dm:-0,ot=rv:fa7d8a542556d0;th:0
x-datadog-parent-id 15530318780937097981
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b0dc75100000000,_dd.p.dm=-0
x-datadog-trace-id 15530318780937097981
test id
datadog-php--kafka-kafka--3e813152
raw statuses
baggage=absenttracestate=present_entry_losttraceparent=new_traceot_baggage=absent
Kafka RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_new_trace

Seeded on the inbound Kafka record headers

baggage routing-key=rk-eb40de80,team=alpha
ot-baggage-routing-key rk-eb40de80
traceparent 00-e040d62829dd2ca05154adc2757d6dbb-11b33810f2010094-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--951b5eae

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

traceparent 00-6b0dc751000000001a3038441a81e47e-1a3038441a81e47e-03
tracestate dd=p:1a3038441a81e47e;t.dm:-0,ot=rv:e23ae05df4b3c4;th:0
x-datadog-parent-id 1887070109021889662
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b0dc75100000000,_dd.p.dm=-0
x-datadog-trace-id 1887070109021889662
test id
datadog-php--kafka-rabbitmq--951b5eae
raw statuses
baggage=absenttracestate=present_entry_losttraceparent=new_traceot_baggage=absent
RabbitMQ HTTP baggage tracestate traceparent ot-baggage delivered via http native: present_same_trace

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-3fc5526e,team=alpha
ot-baggage-routing-key rk-3fc5526e
traceparent 00-5b3d034abdb72ba32d94344a7463398a-1d1b7f0fff3e8f59-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--ce4b51ec

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-3fc5526e,team=alpha
content-length 50
content-type application/json
traceparent 00-5b3d034abdb72ba32d94344a7463398a-284764ffaf248f55-01
tracestate dd=p:284764ffaf248f55;t.dm:-0,cptest=v1
x-datadog-parent-id 2902399534181420885
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=5b3d034abdb72ba3,_dd.p.dm=-0
x-datadog-trace-id 3284307522644818314
test id
datadog-php--rabbitmq-http--ce4b51ec
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_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-5134e058,team=alpha
ot-baggage-routing-key rk-5134e058
traceparent 00-b7afb5dc08a3a669044c924ab688864d-68305ad387c1a618-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--46c0ccf5

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.4 grpc-c/58.0.0 (linux; chttp2)
test id
datadog-php--rabbitmq-grpc--46c0ccf5
raw statuses
baggage=absenttracestate=absenttraceparent=absentot_baggage=absent
RabbitMQ Kafka baggage tracestate traceparent ot-baggage delivered via kafka native: present_same_trace

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-73a06876,team=alpha
ot-baggage-routing-key rk-73a06876
traceparent 00-13440d483b5fa2d0859283bccb07a631-af2f672585dd47ba-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--3b053303

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-73a06876,team=alpha
traceparent 00-13440d483b5fa2d0859283bccb07a631-4ac2f192888f8929-01
tracestate dd=p:4ac2f192888f8929;t.dm:-0,cptest=v1
x-datadog-parent-id 5387133715947161897
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=13440d483b5fa2d0,_dd.p.dm=-0
x-datadog-trace-id 9624900200527537713
test id
datadog-php--rabbitmq-kafka--3b053303
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent
RabbitMQ RabbitMQ baggage tracestate traceparent ot-baggage delivered via rabbitmq native: present_same_trace

Seeded on the inbound AMQP 0-9-1 message headers

baggage routing-key=rk-be73c3e6,team=alpha
ot-baggage-routing-key rk-be73c3e6
traceparent 00-fb24034c1669a6927cff8f1069b8efa3-2d01fd8ce30a9b50-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--0d44bf1e

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

baggage routing-key=rk-be73c3e6,team=alpha
traceparent 00-fb24034c1669a6927cff8f1069b8efa3-09d726a6fd204184-01
tracestate dd=p:09d726a6fd204184;t.dm:-0,cptest=v1
x-datadog-parent-id 709077964987318660
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=fb24034c1669a692,_dd.p.dm=-0
x-datadog-trace-id 9007075080420257699
test id
datadog-php--rabbitmq-rabbitmq--0d44bf1e
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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