datadog-php

PHP zero-code dd-trace-php1.27.1

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 1.27.1 reported as ddtrace 1.27.1 1.27.1 on github-releases github
Runtime
php 8.5.12
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
16 Nov 2026, 12:01 UTC
Harness
cca887a · measured in run-2026-11-16.1
Raw JSON
1.27.1.json → variants[id = "datadog-php"]

Libraries

grpcext-grpc 1.85.0 / grpc/grpc 1.85.0
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-e90fa116,team=alpha
ot-baggage-routing-key rk-e90fa116
traceparent 00-d911b5b3689a98028277f18d047679e0-0613038d6dbd5696-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--44faef22

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-e90fa116,team=alpha
content-length 46
content-type application/json
traceparent 00-d911b5b3689a98028277f18d047679e0-15e5e2966235d97c-01
tracestate dd=p:15e5e2966235d97c;t.dm:-0,cptest=v1
x-datadog-parent-id 1577916379983894908
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=d911b5b3689a9802,_dd.p.dm=-0
x-datadog-trace-id 9401248335126755808
test id
datadog-php--http-http--44faef22
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-3403d9b8,team=alpha
ot-baggage-routing-key rk-3403d9b8
traceparent 00-53dd28c1404ea6b0161e8b8a39f37723-4af81345d98c5216-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--a3378fd8

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--a3378fd8
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-fd8fa8cc,team=alpha
ot-baggage-routing-key rk-fd8fa8cc
traceparent 00-302303abeaf5b9f1b25f7c7fd7a192a2-e46119c520fcd230-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--a7370001

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-fd8fa8cc,team=alpha
traceparent 00-302303abeaf5b9f1b25f7c7fd7a192a2-fb95d01b9c22a59c-01
tracestate dd=p:fb95d01b9c22a59c;t.dm:-0,cptest=v1
x-datadog-parent-id 18128624692052010396
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=302303abeaf5b9f1,_dd.p.dm=-0
x-datadog-trace-id 12853128750059066018
test id
datadog-php--http-kafka--a7370001
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-1f6c4c09,team=alpha
ot-baggage-routing-key rk-1f6c4c09
traceparent 00-956fd33614d5d41dca54a236cd48435e-b0555ffa0adae8ed-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--144898f9

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

baggage routing-key=rk-1f6c4c09,team=alpha
traceparent 00-956fd33614d5d41dca54a236cd48435e-285a367b901b656f-01
tracestate dd=p:285a367b901b656f;t.dm:-0,cptest=v1
x-datadog-parent-id 2907696413747668335
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=956fd33614d5d41d,_dd.p.dm=-0
x-datadog-trace-id 14579456249961136990
test id
datadog-php--http-rabbitmq--144898f9
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-a762ade6,team=alpha
ot-baggage-routing-key rk-a762ade6
traceparent 00-9fa137c8e4f4cd48538d835780379d81-f6f2adc2835b5c1f-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--eb8f0e1c

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--eb8f0e1c
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-3a91089c,team=alpha
ot-baggage-routing-key rk-3a91089c
traceparent 00-7d7d3d47802fb01f28fc87bbd10523ae-a291e5bbb689bcb1-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--e0ebc323

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--e0ebc323
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-3fd95836,team=alpha
ot-baggage-routing-key rk-3fd95836
traceparent 00-c050d6c37b58b0c2674a768fbb0dae07-52d740396a5ac8be-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--9db3d8f1

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--9db3d8f1
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-77636675,team=alpha
ot-baggage-routing-key rk-77636675
traceparent 00-e7a1c3f194413bb03caef5daf7aba778-ac39eb1db7ad0993-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--c80ec235

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--c80ec235
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-045c50e1,team=alpha
ot-baggage-routing-key rk-045c50e1
traceparent 00-2ea5e3f887afe697288f819e3371d699-48a1a62a1918f54d-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--f1e1d9b0

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6afaf09c00000000cca83f642eeabaf7-cca83f642eeabaf7-03
tracestate dd=p:cca83f642eeabaf7;t.dm:-0,ot=rv:0c2b614e48e5a2;th:0
x-datadog-parent-id 14747106679341103863
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6afaf09c00000000,_dd.p.dm=-0
x-datadog-trace-id 14747106679341103863
test id
datadog-php--kafka-http--f1e1d9b0
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-6010555b,team=alpha
ot-baggage-routing-key rk-6010555b
traceparent 00-0fe46e74e395433c8207d6b4ec60eaa8-62ff9d8f13dfa9f1-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--2bb3a059

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--2bb3a059
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-0801e9f5,team=alpha
ot-baggage-routing-key rk-0801e9f5
traceparent 00-47aa34c5bb358298c1044b074efad920-9dbfa74d10397807-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--499f0df6

Observed at the sink on the outbound Kafka record headers

traceparent 00-6afaf09d000000000922bfc3629e889d-0922bfc3629e889d-03
tracestate dd=p:0922bfc3629e889d;t.dm:-0,ot=rv:4b3b8c64654280;th:0
x-datadog-parent-id 658299341443598493
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6afaf09d00000000,_dd.p.dm=-0
x-datadog-trace-id 658299341443598493
test id
datadog-php--kafka-kafka--499f0df6
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-3743f869,team=alpha
ot-baggage-routing-key rk-3743f869
traceparent 00-a42ab27b05069690c0b10c71ec1efb4d-859aa967dda5377c-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--4e46edd4

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

traceparent 00-6afaf09d0000000015c3678c94a23505-15c3678c94a23505-03
tracestate dd=p:15c3678c94a23505;t.dm:-0,ot=rv:1120b5ad6dad94;th:0
x-datadog-parent-id 1568210948741805317
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6afaf09d00000000,_dd.p.dm=-0
x-datadog-trace-id 1568210948741805317
test id
datadog-php--kafka-rabbitmq--4e46edd4
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-9af60546,team=alpha
ot-baggage-routing-key rk-9af60546
traceparent 00-b463335c155bc88ce329837d6b2b4d41-0e3505f71b49c3bb-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--cfd798a1

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-9af60546,team=alpha
content-length 50
content-type application/json
traceparent 00-b463335c155bc88ce329837d6b2b4d41-36b0350c91b2b766-01
tracestate dd=p:36b0350c91b2b766;t.dm:-0,cptest=v1
x-datadog-parent-id 3940708002049472358
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=b463335c155bc88c,_dd.p.dm=-0
x-datadog-trace-id 16368758895346928961
test id
datadog-php--rabbitmq-http--cfd798a1
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-38ff94f2,team=alpha
ot-baggage-routing-key rk-38ff94f2
traceparent 00-79cd46230f13d3f08e091d101b32357e-8468fdd09ef7abf7-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--301651a3

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--301651a3
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-9bd6007c,team=alpha
ot-baggage-routing-key rk-9bd6007c
traceparent 00-f116915b37918de217109097f1ce78ea-c3d2f4c748033a5a-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--9162ea62

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-9bd6007c,team=alpha
traceparent 00-f116915b37918de217109097f1ce78ea-a73fd20838293f82-01
tracestate dd=p:a73fd20838293f82;t.dm:-0,cptest=v1
x-datadog-parent-id 12051582060610535298
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=f116915b37918de2,_dd.p.dm=-0
x-datadog-trace-id 1661987244771014890
test id
datadog-php--rabbitmq-kafka--9162ea62
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-6f69ba0d,team=alpha
ot-baggage-routing-key rk-6f69ba0d
traceparent 00-645c843cdd893123f37765c5e4c2ba47-70e5d5b20e5994ba-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--af60b74f

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

baggage routing-key=rk-6f69ba0d,team=alpha
traceparent 00-645c843cdd893123f37765c5e4c2ba47-f80a84fd539b4efd-01
tracestate dd=p:f80a84fd539b4efd;t.dm:-0,cptest=v1
x-datadog-parent-id 17873244294737514237
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=645c843cdd893123,_dd.p.dm=-0
x-datadog-trace-id 17543602774065986119
test id
datadog-php--rabbitmq-rabbitmq--af60b74f
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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