friendsofopentelemetry/opentelemetry-bundle
Symfony bundle integrating OpenTelemetry PHP for distributed tracing, metrics, and logs with sensible defaults, configurable exporters, and easy instrumentation of requests, console commands, and services.
Architecture fit. friendsofopentelemetry/opentelemetry-bundle remains a Symfony bundle, not a Laravel package — still the single most important finding, and unaffected by beta.7. It wraps the framework-agnostic open-telemetry/opentelemetry-php SDK and adds Symfony-specific glue: DI compiler passes, auto-instrumentation decorators for the HTTP kernel, PSR-18/HttpClient, Messenger, Console, Doctrine, and Twig, plus config-tree handling for exporters, samplers, and resource attributes. The portable value sits in the SDK and opentelemetry-php-contrib instrumentation, not in the bundle. For a Laravel codebase there is no boot path: Laravel's service provider lifecycle never registers a Symfony bundle, and Laravel's use of Symfony components (HttpFoundation, Console, VarDumper) does not supply a Kernel for the bundle to hook.
Integration feasibility. High for Symfony 6.4/7.x on PHP 8.1+. Low-to-zero for Laravel as-is. The realistic Laravel path is unchanged: consume the SDK plus contrib instrumentation and write a thin ServiceProvider + middleware ourselves — borrow the bundle's pattern, not the dependency. A design task, not an install task.
What beta.7 changes. The release is narrow and mostly hygiene, with one substantive feature:
Technical risk.
OTEL_* env-var spec, our platform-level collector/sampling config stops being the source of truth.2026-04-28 last-release date should still be sanity-checked against actual tags before we treat cadence as healthy.Key questions.
keepsuit/laravel-opentelemetry, contrib packages, or in-house)? Which has a healthier release cadence — and is there a Laravel-native equivalent of the new Messenger instrumentation?OTEL_* spec (endpoint, sampler, resource attributes) or require proprietary config?Stack fit. Strong for Symfony + Doctrine + Messenger + PSR-3/PSR-18, and improved by beta.7: async propagation is now first-class for Messenger rather than something we hand-roll. For Laravel the fit is still indirect — Laravel speaks PSR-3 and PSR-18, its HTTP client and queue are wrappable, so the SDK fits and the bundle does not. Treat the bundle as a reference implementation, and now specifically as the reference for how to do queue instrumentation, even though the code will not transfer.
Migration path.
composer require, register in bundles.php, point the OTLP exporter at the collector, set resource attributes (service.name, deployment.environment, version), then enable instrumentation one decorator at a time. Enable Messenger instrumentation last and separately — it is the newest code and the hardest to validate.ServiceProvider, a middleware that starts/ends the root span and injects trace context, and queue-job propagation via serialized headers. Budget 1–2 sprints for a senior engineer, unchanged.Compatibility. Pin exact versions of bundle (beta.7), SDK, and contrib instrumentation together. Verify the Messenger instrumentation against the exact Symfony Messenger version we deploy — new decorators commonly assume a specific middleware-priority arrangement. Validate against the collector version and the backend's OTLP support (HTTP vs gRPC). Confirm behavior on the PHP version we actually run, not just the CI floor.
Sequencing (gate each phase on measured overhead and trace continuity in the backend).
Maintenance. Upstream is small and community-run; if we fork or vendor, we own it. Recurring cost is the dependency-upgrade treadmill: every Symfony minor and every OTel SDK major is a validation exercise. Beta.7 slightly reduces effort on the async path (we would have written that instrumentation anyway for Symfony) but adds a dependency on beta-grade code in a production-critical path. Keep the instrumentation surface minimal and prefer contrib packages over hand-rolled decorators.
Support. MIT, no vendor SLA, thin issue triage at ~68 stars. A first-time contributor landing a substantial feature is encouraging for bus factor but also means the least-reviewed code lands in our riskiest area. Requires a named internal owner and a documented "telemetry is degraded, here's the runbook" path. Do not make this a blocking dependency for incident response.
Scaling. Levers remain the batch span processor and the sampler. Beta.7 raises the stakes on the worker-lifetime failure mode: span accumulation in process-lifetime Messenger consumers is now the bundle's code path, not just ours. Enforce span limits, periodic worker recycling, and memory alerting on consumers. Sampling decisions must be consistent across services or traces fragment.
Failure modes.
Ramp-up. The team needs OpenTelemetry concepts — spans, context propagation, resources, samplers, exporters — plus (newly) enough Symfony Messenger knowledge to reason about middleware ordering and worker lifecycle. Estimate 1–2 weeks for a senior engineer plus the POC sprint; add roughly 2–3 days if we intend to validate and adopt the new Messenger instrumentation.
Recommendation. Beta.7 is a useful but incremental release: it materially strengthens the Symfony case for async workloads and shows healthy maintenance signals (new contributor, advisory hygiene), but it does not change the core finding for a Laravel target, and it introduces fresh, unproven code into the highest-risk operational path. Hold the prior positioning: pattern reference for a Laravel stack; candidate dependency for a confirmed Symfony stack — now pending a spike that explicitly soak-tests the Messenger worker instrumentation before adoption.
How can I help you explore Laravel packages today?