datadog-php

PHP zero-code dd-trace-php1.13.1

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.13.1 reported as ddtrace 1.13.1 1.13.1 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
10 Nov 2026, 10:10 UTC
Harness
374f21d · measured in backtest-datadog-php-1.13.1
Raw JSON
1.13.1.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-3cb1388b,team=alpha
ot-baggage-routing-key rk-3cb1388b
traceparent 00-217f452af5d1bd6ed0f97fceb84e1ae9-9496bce9d2ff5ceb-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--7e47270d

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-3cb1388b,team=alpha
content-length 46
content-type application/json
traceparent 00-217f452af5d1bd6ed0f97fceb84e1ae9-a1dc3f60e4178e32-01
tracestate dd=p:a1dc3f60e4178e32;t.dm:-0,cptest=v1
x-datadog-parent-id 11663266820358901298
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=217f452af5d1bd6e,_dd.p.dm=-0
x-datadog-trace-id 15058207354922081001
test id
datadog-php--http-http--7e47270d
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-12591134,team=alpha
ot-baggage-routing-key rk-12591134
traceparent 00-8aa571ff6e60f396ce52d9a24c6334a5-56eb5cf43f13b3fa-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--c8330060

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--c8330060
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-2ed9ed46,team=alpha
ot-baggage-routing-key rk-2ed9ed46
traceparent 00-4468186edda310140fc6f20003a10e6b-4a4a3dbbb844e901-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--0707bc12

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-2ed9ed46,team=alpha
traceparent 00-4468186edda310140fc6f20003a10e6b-e1bc8ba22ca9c535-01
tracestate dd=p:e1bc8ba22ca9c535;t.dm:-0,cptest=v1
x-datadog-parent-id 16266029482805675317
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=4468186edda31014,_dd.p.dm=-0
x-datadog-trace-id 1136862037832437355
test id
datadog-php--http-kafka--0707bc12
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-2d450110,team=alpha
ot-baggage-routing-key rk-2d450110
traceparent 00-7713ba52d22b4372af06c23e7dc19280-dc137964b94f642a-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--fab876c6

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

baggage routing-key=rk-2d450110,team=alpha
traceparent 00-7713ba52d22b4372af06c23e7dc19280-417edc376ef1d78d-01
tracestate dd=p:417edc376ef1d78d;t.dm:-0,cptest=v1
x-datadog-parent-id 4719451590173513613
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=7713ba52d22b4372,_dd.p.dm=-0
x-datadog-trace-id 12611981380151251584
test id
datadog-php--http-rabbitmq--fab876c6
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-e67616c8,team=alpha
ot-baggage-routing-key rk-e67616c8
traceparent 00-445e19f70825ed4119d6283008223558-378986b99dc130d2-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--7e7ffe0f

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--7e7ffe0f
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-4ee1ee5a,team=alpha
ot-baggage-routing-key rk-4ee1ee5a
traceparent 00-3f7446eae267e9cce6175784aef1135b-4b9534dec1ebf5c7-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--f7c84b0d

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--f7c84b0d
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-0ca30eab,team=alpha
ot-baggage-routing-key rk-0ca30eab
traceparent 00-d905ecf81a5adc6deb0ea81e7418e6c6-401806f5db7b8c07-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--575e7191

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--575e7191
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-2a3f94b8,team=alpha
ot-baggage-routing-key rk-2a3f94b8
traceparent 00-7434eaa246970d09bb0e5f178e3bc046-531f6bf146e1fb0e-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--28c0d5f9

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--28c0d5f9
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-66c34806,team=alpha
ot-baggage-routing-key rk-66c34806
traceparent 00-ef942bb59f2a417db1f3fa04145fd210-74efda6f4a18ab67-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--c3fb7641

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6af2ed7a000000002858f87f2b89bf52-2858f87f2b89bf52-01
tracestate dd=p:2858f87f2b89bf52;t.dm:-0
x-datadog-parent-id 2907346784542637906
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2ed7a00000000,_dd.p.dm=-0
x-datadog-trace-id 2907346784542637906
test id
datadog-php--kafka-http--c3fb7641
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-70782fbb,team=alpha
ot-baggage-routing-key rk-70782fbb
traceparent 00-d760b72c4b4be537593cc2a3dadc8617-ba82aa3c3f8e999a-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--89c45c99

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--89c45c99
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-710c1ac8,team=alpha
ot-baggage-routing-key rk-710c1ac8
traceparent 00-38db8f04b339f9b916ef7a6f242c4791-026829e94ea957f8-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--3fe50fab

Observed at the sink on the outbound Kafka record headers

traceparent 00-6af2ed7b00000000e74656469a8a038d-e74656469a8a038d-01
tracestate dd=p:e74656469a8a038d;t.dm:-0
x-datadog-parent-id 16665102332371534733
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2ed7b00000000,_dd.p.dm=-0
x-datadog-trace-id 16665102332371534733
test id
datadog-php--kafka-kafka--3fe50fab
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-6d7cde7b,team=alpha
ot-baggage-routing-key rk-6d7cde7b
traceparent 00-2bfc4fe8a853ac5f1391a8512cc8a0a9-e20e13c38bd7f2e1-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--d4bd3ab7

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

traceparent 00-6af2ed7c00000000e2de4c86adcb5556-e2de4c86adcb5556-01
tracestate dd=p:e2de4c86adcb5556;t.dm:-0
x-datadog-parent-id 16347587838726591830
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2ed7c00000000,_dd.p.dm=-0
x-datadog-trace-id 16347587838726591830
test id
datadog-php--kafka-rabbitmq--d4bd3ab7
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-2e60f11f,team=alpha
ot-baggage-routing-key rk-2e60f11f
traceparent 00-4a7140218219d1d615c9de7cfb07bf52-ed4d8f44854b6346-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--d24fcea3

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-2e60f11f,team=alpha
content-length 50
content-type application/json
traceparent 00-4a7140218219d1d615c9de7cfb07bf52-ff80dda8abc0ec86-01
tracestate dd=p:ff80dda8abc0ec86;t.dm:-0,cptest=v1
x-datadog-parent-id 18410958993196379270
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=4a7140218219d1d6,_dd.p.dm=-0
x-datadog-trace-id 1570030573484228434
test id
datadog-php--rabbitmq-http--d24fcea3
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-b927b2e3,team=alpha
ot-baggage-routing-key rk-b927b2e3
traceparent 00-e28c1e1cc0d8564229ae8ff9f57068bf-5672abbd1cfcf6b6-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--c97f323f

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--c97f323f
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-f5d11a99,team=alpha
ot-baggage-routing-key rk-f5d11a99
traceparent 00-90770589d766fbe6e540d0c7bdf0254c-14c47a6fc87cce5a-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--a7689751

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-f5d11a99,team=alpha
traceparent 00-90770589d766fbe6e540d0c7bdf0254c-e12ec5ffdea39576-01
tracestate dd=p:e12ec5ffdea39576;t.dm:-0,cptest=v1
x-datadog-parent-id 16226124210205070710
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=90770589d766fbe6,_dd.p.dm=-0
x-datadog-trace-id 16519432989498680652
test id
datadog-php--rabbitmq-kafka--a7689751
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-0de92000,team=alpha
ot-baggage-routing-key rk-0de92000
traceparent 00-83eafaffde98f9cb2dfd801ee9ec9282-03eb556f5c391cb0-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--14887d13

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

baggage routing-key=rk-0de92000,team=alpha
traceparent 00-83eafaffde98f9cb2dfd801ee9ec9282-6b49e7b41c0e8e29-01
tracestate dd=p:6b49e7b41c0e8e29;t.dm:-0,cptest=v1
x-datadog-parent-id 7730964996109012521
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=83eafaffde98f9cb,_dd.p.dm=-0
x-datadog-trace-id 3313945771076522626
test id
datadog-php--rabbitmq-rabbitmq--14887d13
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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