datadog-php

PHP zero-code dd-trace-php1.16.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.16.0 reported as ddtrace 1.16.0 1.16.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
10 Nov 2026, 08:29 UTC
Harness
9b99070 · measured in backtest-datadog-php-1.16.0
Raw JSON
1.16.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-c1b921ea,team=alpha
ot-baggage-routing-key rk-c1b921ea
traceparent 00-179c71593c395bdbc411bf4d324a79f2-9de46f2ef85a5e78-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--2daf9afb

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-c1b921ea,team=alpha
content-length 46
content-type application/json
traceparent 00-179c71593c395bdbc411bf4d324a79f2-3197fc3a077bf5ba-01
tracestate dd=p:3197fc3a077bf5ba;t.dm:-0,cptest=v1
x-datadog-parent-id 3573602155505644986
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=179c71593c395bdb,_dd.p.dm=-0
x-datadog-trace-id 14128283844315085298
test id
datadog-php--http-http--2daf9afb
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-56a49cdb,team=alpha
ot-baggage-routing-key rk-56a49cdb
traceparent 00-1eeb01f1e2da2b9cc164eeca099569ff-a57fdb030a811286-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--800e28b9

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--800e28b9
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-0900cd32,team=alpha
ot-baggage-routing-key rk-0900cd32
traceparent 00-8383c17e1765274ab6b8fe7219ddfa06-a82f7fb2fe9448d5-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--c810f3f3

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-0900cd32,team=alpha
traceparent 00-8383c17e1765274ab6b8fe7219ddfa06-5f9d121de9d36b8d-01
tracestate dd=p:5f9d121de9d36b8d;t.dm:-0,cptest=v1
x-datadog-parent-id 6889682924633025421
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=8383c17e1765274a,_dd.p.dm=-0
x-datadog-trace-id 13166553276631349766
test id
datadog-php--http-kafka--c810f3f3
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-cc90cf99,team=alpha
ot-baggage-routing-key rk-cc90cf99
traceparent 00-8ec33f6b07934fd6f9efe05b61794aef-d90c6e6412d2fbde-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--4f54bd6f

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

baggage routing-key=rk-cc90cf99,team=alpha
traceparent 00-8ec33f6b07934fd6f9efe05b61794aef-972933f867cff3ac-01
tracestate dd=p:972933f867cff3ac;t.dm:-0,cptest=v1
x-datadog-parent-id 10892294315758842796
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=8ec33f6b07934fd6,_dd.p.dm=-0
x-datadog-trace-id 18009860117959887599
test id
datadog-php--http-rabbitmq--4f54bd6f
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-7024b2b0,team=alpha
ot-baggage-routing-key rk-7024b2b0
traceparent 00-e690c34d09e305a1541694e2f417e9f7-496cceee81fa5547-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--358dc390

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--358dc390
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-071b0774,team=alpha
ot-baggage-routing-key rk-071b0774
traceparent 00-bfe6a131736011c04030ed0ebcfacb4c-3f8431761ca1de7d-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--8e323205

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--8e323205
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-610a025c,team=alpha
ot-baggage-routing-key rk-610a025c
traceparent 00-1aedbb3f8bfc45ee9af46727a2ff0aed-c1e72e628b82491b-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--cbe864ab

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--cbe864ab
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-b088eb3c,team=alpha
ot-baggage-routing-key rk-b088eb3c
traceparent 00-f11160467214fdad03858d5a7d5a2fe8-444451413fcccf69-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--e924fa5b

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--e924fa5b
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-3247dd8b,team=alpha
ot-baggage-routing-key rk-3247dd8b
traceparent 00-244c8c67ca3b458d0ed4b8e3f90bb0a6-75bdd40fa93dc5c2-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--12136efb

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6af2d5e800000000c59572308fd20520-c59572308fd20520-01
tracestate dd=p:c59572308fd20520;t.dm:-0
x-datadog-parent-id 14237411349898593568
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2d5e800000000,_dd.p.dm=-0
x-datadog-trace-id 14237411349898593568
test id
datadog-php--kafka-http--12136efb
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-58717c12,team=alpha
ot-baggage-routing-key rk-58717c12
traceparent 00-9f83a33eadbc7faf3a4b6f66359b0089-58796c5c50ea9c76-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--f993ef84

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--f993ef84
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-f845f65c,team=alpha
ot-baggage-routing-key rk-f845f65c
traceparent 00-d9dd2573e6f731a8ac27b027bf3357a2-2639c08ee7989041-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--ba171d03

Observed at the sink on the outbound Kafka record headers

traceparent 00-6af2d5e90000000000097178ade6dfa7-00097178ade6dfa7-01
tracestate dd=p:00097178ade6dfa7;t.dm:-0
x-datadog-parent-id 2658037917999015
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2d5e900000000,_dd.p.dm=-0
x-datadog-trace-id 2658037917999015
test id
datadog-php--kafka-kafka--ba171d03
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-8e69948a,team=alpha
ot-baggage-routing-key rk-8e69948a
traceparent 00-7d588a83c2ca47faa2d7321fa6c24387-7850087c344926c3-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--167f5498

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

traceparent 00-6af2d5e900000000b2941628aad22a4c-b2941628aad22a4c-01
tracestate dd=p:b2941628aad22a4c;t.dm:-0
x-datadog-parent-id 12867934399224752716
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6af2d5e900000000,_dd.p.dm=-0
x-datadog-trace-id 12867934399224752716
test id
datadog-php--kafka-rabbitmq--167f5498
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-f9710c32,team=alpha
ot-baggage-routing-key rk-f9710c32
traceparent 00-5a58bee1f9a482b1a1f72d1e6b3786c6-c7f669e2c173f355-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--88bc3c46

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-f9710c32,team=alpha
content-length 50
content-type application/json
traceparent 00-5a58bee1f9a482b1a1f72d1e6b3786c6-9ffdd176e695e5ab-01
tracestate dd=p:9ffdd176e695e5ab;t.dm:-0,cptest=v1
x-datadog-parent-id 11528600929743267243
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=5a58bee1f9a482b1,_dd.p.dm=-0
x-datadog-trace-id 11670846568024999622
test id
datadog-php--rabbitmq-http--88bc3c46
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-93e82a9a,team=alpha
ot-baggage-routing-key rk-93e82a9a
traceparent 00-aee101dbc5f51b532830f0edd1034c44-7072ceb01e512164-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--6c5abd41

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--6c5abd41
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-dd08948d,team=alpha
ot-baggage-routing-key rk-dd08948d
traceparent 00-377ebbe02eb17a337a742b3b52921bb4-44d38ca6b75b7069-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--96b6a81c

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-dd08948d,team=alpha
traceparent 00-377ebbe02eb17a337a742b3b52921bb4-1c298537e2785589-01
tracestate dd=p:1c298537e2785589;t.dm:-0,cptest=v1
x-datadog-parent-id 2029299582176351625
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=377ebbe02eb17a33,_dd.p.dm=-0
x-datadog-trace-id 8823725103714016180
test id
datadog-php--rabbitmq-kafka--96b6a81c
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-fdb61245,team=alpha
ot-baggage-routing-key rk-fdb61245
traceparent 00-0678fcd4f5c8a0e915429cb436ab0c99-18d70bee0c0c4724-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--e9118a89

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

baggage routing-key=rk-fdb61245,team=alpha
traceparent 00-0678fcd4f5c8a0e915429cb436ab0c99-458d8684561ea432-01
tracestate dd=p:458d8684561ea432;t.dm:-0,cptest=v1
x-datadog-parent-id 5011809863271883826
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=0678fcd4f5c8a0e9,_dd.p.dm=-0
x-datadog-trace-id 1531959121084615833
test id
datadog-php--rabbitmq-rabbitmq--e9118a89
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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