Problem Statement
I'm trying to connect distributed traces across a PHP service and a Node.js service, both reporting to Sentry. The PHP service calls the Node.js service over HTTP.
PHP side uses OpenTelemetry PHP SDK for auto-instrumentation, configured to export via OTLP to Sentry's collector. The OTel PHP SDK propagates trace context using the traceparent header.
Node.js side uses @sentry/node, which sets up OTel internally. The SentryPropagator appears to only read sentry-trace and baggage headers. It does not pick up the incoming traceparent header sent by PHP.
As a result, traces from PHP and Node.js are not connected in Sentry UI.
Solution Brainstorm
I'm not sure whether this should be reported here or in the JavaScript SDK repository. There seem to be two possible fixes:
- PHP SDK: add a Sentry OTEL propagator that injects
sentry-trace and baggage, so downstream Sentry SDKs can pick up the trace context
- JavaScript SDK: make
SentryPropagator also extract trace context from the traceparent header
Problem Statement
I'm trying to connect distributed traces across a PHP service and a Node.js service, both reporting to Sentry. The PHP service calls the Node.js service over HTTP.
PHP side uses OpenTelemetry PHP SDK for auto-instrumentation, configured to export via OTLP to Sentry's collector. The OTel PHP SDK propagates trace context using the
traceparentheader.Node.js side uses
@sentry/node, which sets up OTel internally. TheSentryPropagatorappears to only readsentry-traceandbaggageheaders. It does not pick up the incomingtraceparentheader sent by PHP.As a result, traces from PHP and Node.js are not connected in Sentry UI.
Solution Brainstorm
I'm not sure whether this should be reported here or in the JavaScript SDK repository. There seem to be two possible fixes:
sentry-traceandbaggage, so downstream Sentry SDKs can pick up the trace contextSentryPropagatoralso extract trace context from thetraceparentheader