Skip to content

Distributed tracing broken between PHP with OTLP and Node.js Sentry SDK #2095

@mnow-cd

Description

@mnow-cd

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:

  1. PHP SDK: add a Sentry OTEL propagator that injects sentry-trace and baggage, so downstream Sentry SDKs can pick up the trace context
  2. JavaScript SDK: make SentryPropagator also extract trace context from the traceparent header

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions