datadog-php

PHP zero-code dd-trace-php1.26.0

attach datadog-setup.php installer (ddtrace extension)

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

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 1.26.0 reported as ddtrace 1.26.0 1.26.0 on github-releases 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
datadog-setup.php installer (ddtrace extension)
Relay source
relays/php
Ran at
9 Nov 2026, 19:51 UTC
Harness
9b99070 · measured in backtest-datadog-php-1.26.0
Raw JSON
1.26.0.json → variants[id = "datadog-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

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-be6e203d,team=alpha
ot-baggage-routing-key rk-be6e203d
traceparent 00-8ae911798dbb56a2f0f9c708d29f2f9f-9b6eb1fc84f2b51f-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--7cb9263c

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-be6e203d,team=alpha
content-length 46
content-type application/json
traceparent 00-8ae911798dbb56a2f0f9c708d29f2f9f-1d51c700c34ba225-01
tracestate dd=p:1d51c700c34ba225;t.dm:-0,cptest=v1
x-datadog-parent-id 2112688506303914533
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=8ae911798dbb56a2,_dd.p.dm=-0
x-datadog-trace-id 17364128679010971551
test id
datadog-php--http-http--7cb9263c
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-817633eb,team=alpha
ot-baggage-routing-key rk-817633eb
traceparent 00-e0c95895aef91afcb9e86b23b50b7b41-019be66dc858e0b4-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--506aea11

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
datadog-php--http-grpc--506aea11
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-3a2be582,team=alpha
ot-baggage-routing-key rk-3a2be582
traceparent 00-a031b9903d28a62bde3abb4f8e2e93f8-99715ad412c3c881-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--c3e341ed

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-3a2be582,team=alpha
traceparent 00-a031b9903d28a62bde3abb4f8e2e93f8-644d496543df9727-01
tracestate dd=p:644d496543df9727;t.dm:-0,cptest=v1
x-datadog-parent-id 7227513676278765351
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=a031b9903d28a62b,_dd.p.dm=-0
x-datadog-trace-id 16013317375431447544
test id
datadog-php--http-kafka--c3e341ed
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-ad768581,team=alpha
ot-baggage-routing-key rk-ad768581
traceparent 00-e4f3c0b4a741d82d9ac159fc3ae6ce4b-e9b14829916d527a-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--30206e14

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

baggage routing-key=rk-ad768581,team=alpha
traceparent 00-e4f3c0b4a741d82d9ac159fc3ae6ce4b-4a4cad8fc2218565-01
tracestate dd=p:4a4cad8fc2218565;t.dm:-0,cptest=v1
x-datadog-parent-id 5353844889985582437
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=e4f3c0b4a741d82d,_dd.p.dm=-0
x-datadog-trace-id 11151293092200894027
test id
datadog-php--http-rabbitmq--30206e14
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-ef267748,team=alpha
ot-baggage-routing-key rk-ef267748
traceparent 00-0e6043457884e0a53a579dd2834a2b53-eb7e7348a2adc2bf-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--5be1f87b

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--5be1f87b
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-44dd28df,team=alpha
ot-baggage-routing-key rk-44dd28df
traceparent 00-61d8e2a63464a7dc3bc32612f7edccd8-0704e999c09c378e-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--3de90206

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--3de90206
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-0f5763e5,team=alpha
ot-baggage-routing-key rk-0f5763e5
traceparent 00-bcc55c05cf60a303dfc3958098dd03bd-7aefe1bf0c27cd29-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--37dcf1a1

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--37dcf1a1
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-36e283df,team=alpha
ot-baggage-routing-key rk-36e283df
traceparent 00-815d261b7b5d7b7cf655f254f4dc5e31-fd05bdc4ca2e38b3-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--0725c695

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--0725c695
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-a1e773fd,team=alpha
ot-baggage-routing-key rk-a1e773fd
traceparent 00-f7088a3314bc6e825c98013a5dceabcd-600209cc0b23b3cc-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--dafee5e9

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6af2244e00000000f9cfa9fb623b8992-f9cfa9fb623b8992-03
tracestate dd=p:f9cfa9fb623b8992;t.dm:-0,ot=rv:e5e9130382369d;th:0
x-datadog-parent-id 18000793132773116306
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2244e00000000,_dd.p.dm=-0
x-datadog-trace-id 18000793132773116306
test id
datadog-php--kafka-http--dafee5e9
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-ac07ef34,team=alpha
ot-baggage-routing-key rk-ac07ef34
traceparent 00-b3c14ad2b8c1acfbdc94a8a2188065ec-e5efabb65ea7ff12-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--6cf1f5ac

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
datadog-php--kafka-grpc--6cf1f5ac
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-ff448c92,team=alpha
ot-baggage-routing-key rk-ff448c92
traceparent 00-953a559ae277a65c557d861cc8108121-aac2e9d5e2453629-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--e9928bb1

Observed at the sink on the outbound Kafka record headers

traceparent 00-6af2244f00000000f9b907455ef5e772-f9b907455ef5e772-03
tracestate dd=p:f9b907455ef5e772;t.dm:-0,ot=rv:c13704dd4a67c4;th:0
x-datadog-parent-id 17994421780662839154
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2244f00000000,_dd.p.dm=-0
x-datadog-trace-id 17994421780662839154
test id
datadog-php--kafka-kafka--e9928bb1
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-ee65ac27,team=alpha
ot-baggage-routing-key rk-ee65ac27
traceparent 00-8a626c749580c11ed6b606fdbdb3e086-eb5d77fe299dfb11-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--2ea200ac

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

traceparent 00-6af2245000000000a2395a959d9fa4a8-a2395a959d9fa4a8-03
tracestate dd=p:a2395a959d9fa4a8;t.dm:-0,ot=rv:2e4c4804b898d9;th:0
x-datadog-parent-id 11689473906457945256
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2245000000000,_dd.p.dm=-0
x-datadog-trace-id 11689473906457945256
test id
datadog-php--kafka-rabbitmq--2ea200ac
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-9c5ebf5c,team=alpha
ot-baggage-routing-key rk-9c5ebf5c
traceparent 00-6fa70eff6b75e9b6136eb9d26c38d4e3-2d09190a5f3ad517-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--4c69a00f

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-9c5ebf5c,team=alpha
content-length 50
content-type application/json
traceparent 00-6fa70eff6b75e9b6136eb9d26c38d4e3-ac3fc03e19ea5e12-01
tracestate dd=p:ac3fc03e19ea5e12;t.dm:-0,cptest=v1
x-datadog-parent-id 12411850471011671570
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6fa70eff6b75e9b6,_dd.p.dm=-0
x-datadog-trace-id 1400260847568737507
test id
datadog-php--rabbitmq-http--4c69a00f
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-863b8d15,team=alpha
ot-baggage-routing-key rk-863b8d15
traceparent 00-052839ab496b6a9812abc360a162e7d6-257a360a252ca813-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--bbb7bcdb

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
datadog-php--rabbitmq-grpc--bbb7bcdb
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-23659a24,team=alpha
ot-baggage-routing-key rk-23659a24
traceparent 00-8450e81ecc5319f095c3dbcec8f8719b-cafb19e1e48b8f86-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--607ccf6b

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-23659a24,team=alpha
traceparent 00-8450e81ecc5319f095c3dbcec8f8719b-891ce16cf5632ff6-01
tracestate dd=p:891ce16cf5632ff6;t.dm:-0,cptest=v1
x-datadog-parent-id 9880019540633661430
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=8450e81ecc5319f0,_dd.p.dm=-0
x-datadog-trace-id 10791710813291311515
test id
datadog-php--rabbitmq-kafka--607ccf6b
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-a686f8d7,team=alpha
ot-baggage-routing-key rk-a686f8d7
traceparent 00-82482778ef5d467e11c71d9066b9caa6-626573756efb03ec-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--d0e2d8b5

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

baggage routing-key=rk-a686f8d7,team=alpha
traceparent 00-82482778ef5d467e11c71d9066b9caa6-73e9331fc67b4d86-01
tracestate dd=p:73e9331fc67b4d86;t.dm:-0,cptest=v1
x-datadog-parent-id 8352263195502267782
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=82482778ef5d467e,_dd.p.dm=-0
x-datadog-trace-id 1281025125046143654
test id
datadog-php--rabbitmq-rabbitmq--d0e2d8b5
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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