open-telemetry/opentelemetry-propagation-traceresponse
Adds TraceResponse propagation support to the OpenTelemetry PHP SDK, letting services extract and inject trace context using the draft TraceResponse format. Useful when integrating with systems that emit or expect this header, keeping distributed traces connected across service boundaries.
Architecture fit
TextMapPropagator implementation for the draft traceresponse HTTP header. It slots into the OpenTelemetry PHP SDK's propagator chain (CompositePropagator) alongside tracecontext and baggage; it is not a tracer, exporter, or instrumentation library, so it adds no new pipeline stage.traceresponse header — a partner API, a browser-side RUM agent, a third-party edge/WAF, or an internal client SDK. Absent a named consumer, this is header decoration with no correlating counterpart.traceparent. Running both is fine but doubles context surface on every response and invites confusion about which header is authoritative for support/debugging workflows.Integration feasibility
OTEL_PROPAGATORS=tracecontext,baggage,traceresponse or the SDK builder equivalent), plus a Laravel middleware to ensure the header is emitted on responses generated outside the auto-instrumentation path (exception handlers, abort(), early-return middleware).opentelemetry-api 1.x, consistent with the rest of the OTel PHP stack.traceresponse must be injected into the response returned to the caller. That is a kernel-level middleware decision and needs ordering review under Octane and under Route::fallback/error paths.Technical risk
traceresponse is a draft in the W3C distributed-tracing orbit, not a ratified standard. Header name, encoding, and semantics can move. Treat any adoption as reversible and behind a flag.[READONLY] and living in a contrib-* repo — this is the classic "absorbed into the monorepo / frozen" signal. It will not receive features, and its future is a re-publish from the consolidated contrib repository under a possibly different constraint set.Access-Control-Expose-Headers; CDNs and reverse proxies may strip or cache it; some gateways reject unknown response headers.Key questions
traceresponse, and can they commit to it in writing? If the answer is "no one yet," defer.contrib-* package have a documented successor package and migration note in the main contrib repo?traceresponse headers end to end?Stack fit
open-telemetry/opentelemetry-auto-laravel, TextMapPropagator registered in the composite. Nothing Laravel-specific is required from the package, which is a positive for portability and a negative for out-of-the-box ergonomics.tracecontext/baggage. Recommended chain: tracecontext,baggage,traceresponse.Migration path
composer.json entry, and wrap the propagator registration in a config flag (OTEL_TRACERESPONSE_ENABLED) so the swap to a successor package is a one-line change plus a config toggle.tracecontext, this is additive; no cutover sequencing is required. Do not build client-facing contracts on the header before the spec stabilizes.Compatibility
opentelemetry-api/opentelemetry-sdk versions in the app; contrib packages in this ecosystem historically lag the API's minor releases during breaking-change windows.TerminateMiddleware, StreamedResponse, and exception rendering each take a different path.Sequencing
Maintenance
Support
traceparent is authoritative and traceresponse is supplementary, so responders don't chase the wrong header.Scaling
Failure modes
tracecontext and traceresponse are present → define precedence and document it.Ramp-up
How can I help you explore Laravel packages today?