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

80 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.

30 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.

92 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 in this run

Tracer
DataDog/dd-trace-php 2.0.0 reported as ddtrace 2.0.0 this version 2.0.0 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
23 Nov 2026, 13:41 UTC
Harness
bb1ee3e · run run-2026-11-24.2
Raw JSON
run-2026-11-24.2.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-d663793c,team=alpha
ot-baggage-routing-key rk-d663793c
traceparent 00-0ea475410c9cdf2fd637b5835e76cbe9-3624a5a54542c167-01
tracestate cptest=v1
x-cp-canary datadog-php--http-http--19ec121f

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-d663793c,team=alpha
content-length 46
content-type application/json
traceparent 00-0ea475410c9cdf2fd637b5835e76cbe9-02d8cc91e1c12a68-01
tracestate dd=p:02d8cc91e1c12a68;t.dm:-0,cptest=v1
x-datadog-parent-id 205138709975214696
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=0ea475410c9cdf2f,_dd.p.dm=-0
x-datadog-trace-id 15436005823665851369
test id
datadog-php--http-http--19ec121f
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-8e88ab8a,team=alpha
ot-baggage-routing-key rk-8e88ab8a
traceparent 00-a088cde5af3f51782d2f765cd66f321f-b0d0319f3c1955dc-01
tracestate cptest=v1
x-cp-canary datadog-php--http-grpc--81baba1a

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--81baba1a
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-64064c8e,team=alpha
ot-baggage-routing-key rk-64064c8e
traceparent 00-3e9d2a17f89caf79c4a898804ca32c38-525153a1f4de6705-01
tracestate cptest=v1
x-cp-canary datadog-php--http-kafka--da06f56d

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-64064c8e,team=alpha
traceparent 00-3e9d2a17f89caf79c4a898804ca32c38-9deb5e09604c3a96-01
tracestate dd=p:9deb5e09604c3a96;t.dm:-0,cptest=v1
x-datadog-parent-id 11379292277845015190
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=3e9d2a17f89caf79,_dd.p.dm=-0
x-datadog-trace-id 14170743904330263608
test id
datadog-php--http-kafka--da06f56d
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-2847e410,team=alpha
ot-baggage-routing-key rk-2847e410
traceparent 00-92f547077142d6ac52b50d47801020f2-a8054feff7e56a6d-01
tracestate cptest=v1
x-cp-canary datadog-php--http-rabbitmq--35dd8ccf

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

baggage routing-key=rk-2847e410,team=alpha
traceparent 00-92f547077142d6ac52b50d47801020f2-5f02db4328655401-01
tracestate dd=p:5f02db4328655401;t.dm:-0,cptest=v1
x-datadog-parent-id 6846275465043596289
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=92f547077142d6ac,_dd.p.dm=-0
x-datadog-trace-id 5959684282637099250
test id
datadog-php--http-rabbitmq--35dd8ccf
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-caf4251e,team=alpha
ot-baggage-routing-key rk-caf4251e
traceparent 00-916e8f44c3fc46f604fd0dd3ca1f5431-3c5076e5751760c7-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-http--11e958c3

Observed at the sink on the outbound HTTP request headers

Nothing reached the sink.

test id
datadog-php--grpc-http--11e958c3
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-f9a18941,team=alpha
ot-baggage-routing-key rk-f9a18941
traceparent 00-970e83147e7f8c159adfe788fdffd50f-63eaabe2f08a8e87-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-grpc--4b13037b

Observed at the sink on the outbound gRPC metadata

Nothing reached the sink.

test id
datadog-php--grpc-grpc--4b13037b
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-fedada83,team=alpha
ot-baggage-routing-key rk-fedada83
traceparent 00-203d07b71a1d298cd0db96a3313f745c-da545d25f31cf88b-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-kafka--7d4f8096

Observed at the sink on the outbound Kafka record headers

Nothing reached the sink.

test id
datadog-php--grpc-kafka--7d4f8096
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-11507796,team=alpha
ot-baggage-routing-key rk-11507796
traceparent 00-4db9d64cbb1370e5d6e6d9f6f490a65e-d5e7b1dc7af89a4d-01
tracestate cptest=v1
x-cp-canary datadog-php--grpc-rabbitmq--8a7f263c

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

Nothing reached the sink.

test id
datadog-php--grpc-rabbitmq--8a7f263c
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-44db413e,team=alpha
ot-baggage-routing-key rk-44db413e
traceparent 00-321ff371b4433d807b1635aa9e49368c-22b1f3e93c785e2d-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-http--bdd52fca

Observed at the sink on the outbound HTTP request headers

accept */*
content-length 47
content-type application/json
traceparent 00-6b04429e00000000f2e94a2352a07af6-f2e94a2352a07af6-03
tracestate dd=p:f2e94a2352a07af6;t.dm:-0,ot=rv:28caff3a78a1d4;th:0
x-datadog-parent-id 17503602942322703094
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b04429e00000000,_dd.p.dm=-0
x-datadog-trace-id 17503602942322703094
test id
datadog-php--kafka-http--bdd52fca
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-48f32ee6,team=alpha
ot-baggage-routing-key rk-48f32ee6
traceparent 00-0e127bf7aa58921354166fdb7938a9b6-3125c5b7129766ed-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-grpc--10a609df

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--10a609df
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-20c337c8,team=alpha
ot-baggage-routing-key rk-20c337c8
traceparent 00-873eab116a7ee0091648cdf90f52ee1c-5dea96b5263db800-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-kafka--f25163ae

Observed at the sink on the outbound Kafka record headers

traceparent 00-6b04429f00000000239f1d3f2699e184-239f1d3f2699e184-03
tracestate dd=p:239f1d3f2699e184;t.dm:-0,ot=rv:f88b06013cc66e;th:0
x-datadog-parent-id 2566802469692236164
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b04429f00000000,_dd.p.dm=-0
x-datadog-trace-id 2566802469692236164
test id
datadog-php--kafka-kafka--f25163ae
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-d460bb31,team=alpha
ot-baggage-routing-key rk-d460bb31
traceparent 00-079ca47a10e996e3aef3c229ac1b3d13-dc078c8436f9739d-01
tracestate cptest=v1
x-cp-canary datadog-php--kafka-rabbitmq--a6a95040

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

traceparent 00-6b0442a000000000f0f906b93fef91a3-f0f906b93fef91a3-03
tracestate dd=p:f0f906b93fef91a3;t.dm:-0,ot=rv:e02b0903abb0d7;th:0
x-datadog-parent-id 17363917231015039395
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=6b0442a000000000,_dd.p.dm=-0
x-datadog-trace-id 17363917231015039395
test id
datadog-php--kafka-rabbitmq--a6a95040
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-f311e2bd,team=alpha
ot-baggage-routing-key rk-f311e2bd
traceparent 00-2e084bf404783438ce0239a6e7fc9e5b-f6bba0cb96c42d6d-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-http--37f01ddb

Observed at the sink on the outbound HTTP request headers

accept */*
baggage routing-key=rk-f311e2bd,team=alpha
content-length 50
content-type application/json
traceparent 00-2e084bf404783438ce0239a6e7fc9e5b-b052b2e393eeba4c-01
tracestate dd=p:b052b2e393eeba4c;t.dm:-0,cptest=v1
x-datadog-parent-id 12705414189274806860
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=2e084bf404783438,_dd.p.dm=-0
x-datadog-trace-id 14844490710786023003
test id
datadog-php--rabbitmq-http--37f01ddb
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-a57dff5f,team=alpha
ot-baggage-routing-key rk-a57dff5f
traceparent 00-9d8dc9c083ea0737740980c3bf9b97d6-f66800387fac22b1-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-grpc--206e841f

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--206e841f
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-43f3e733,team=alpha
ot-baggage-routing-key rk-43f3e733
traceparent 00-37d89e031ad08310701bb8d1409abf7c-97aa6ce66e3b7f54-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-kafka--ccc2f06d

Observed at the sink on the outbound Kafka record headers

baggage routing-key=rk-43f3e733,team=alpha
traceparent 00-37d89e031ad08310701bb8d1409abf7c-466e0137ac391b32-01
tracestate dd=p:466e0137ac391b32;t.dm:-0,cptest=v1
x-datadog-parent-id 5074995168717380402
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=37d89e031ad08310,_dd.p.dm=-0
x-datadog-trace-id 8078253565490675580
test id
datadog-php--rabbitmq-kafka--ccc2f06d
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-cd88b833,team=alpha
ot-baggage-routing-key rk-cd88b833
traceparent 00-651783e5c3581c5194d4ddedfe77000b-6f3b6120c63661ba-01
tracestate cptest=v1
x-cp-canary datadog-php--rabbitmq-rabbitmq--55dfbc5d

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

baggage routing-key=rk-cd88b833,team=alpha
traceparent 00-651783e5c3581c5194d4ddedfe77000b-043c68fcb5e16dbe-01
tracestate dd=p:043c68fcb5e16dbe;t.dm:-0,cptest=v1
x-datadog-parent-id 305234309346848190
x-datadog-sampling-priority 1
x-datadog-tags _dd.p.tid=651783e5c3581c51,_dd.p.dm=-0
x-datadog-trace-id 10724440626922192907
test id
datadog-php--rabbitmq-rabbitmq--55dfbc5d
raw statuses
baggage=propagatedtracestate=preservedtraceparent=same_traceot_baggage=absent

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