open-telemetry/symfony-sdk-bundle
Symfony bundle for integrating the OpenTelemetry PHP SDK into Symfony applications. It provides bundle configuration and container wiring for tracing, metrics, and logs, making it easier to instrument services and export telemetry through configured OpenTelemetry exporters such as OTLP.
Framing correction: despite the brief describing this as a "Laravel/PHP package," open-telemetry/symfony-sdk-bundle is a Symfony bundle for the OpenTelemetry PHP SDK. It targets Symfony's kernel/DI model (Bundle class, Extension::load(), configuration tree, compiler passes, kernel.request/kernel.response/console event subscribers). A Laravel application cannot consume it as-is. Treat the recommendation below as "adopt the SDK and its Laravel-side equivalent; treat this bundle as a reference implementation at most."
Architecture fit
open-telemetry/sdk, open-telemetry/exporter-otlp, open-telemetry/sem-conv, and the contrib instrumentation packages. Those are framework-agnostic (PSR-18/PSR-17 based) and are what any Laravel wiring would sit on.Integration feasibility
config/telemetry.php + TelemetryServiceProvider.Technical risk
Key questions
open-telemetry/sdk version constraint, and is it aligned with the version the Laravel instrumentation packages require? A split constraint forces us to abandon one of them.ext-grpc required? This determines our base image and sidecar/agent topology.Stack fit
Migration path
open-telemetry/sdk + exporter-otlp + sem-conv. Create config/telemetry.php with OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_TRACES_SAMPLER, OTEL_PROPAGATORS. Bind a singleton TracerProvider in a TelemetryServiceProvider, registered late so it wraps other providers.traceparent from inbound headers, starts a root span, and injects the context into the Laravel container/log context so logs and spans correlate. Emit http.route, http.method, http.status_code per sem-conv — never raw URLs with IDs.JobProcessing. This is the single highest-value integration and the most commonly botched one; without it, traces terminate at the queue boundary and the investment is largely wasted.Compatibility
EventDispatcherInterface type hints leak into application code.config:cache or route:cache, when env vars may be absent.RequestTerminated; otherwise spans and baggage leak between requests.Sequencing
Maintenance
composer update. Upstream breaking changes land in minors.Support
Scaling
BatchSpanProcessor with queue size and timeout tuned to traffic; never SimpleSpanProcessor in a request path.Failure modes
traceparent propagation — especially across queues and Guzzle clients — produces traces that look healthy in isolation and are useless in aggregate. Add a synthetic check that asserts a known trace ID reaches the backend.Ramp-up
How can I help you explore Laravel packages today?