open-telemetry/opentelemetry-auto-symfony
OpenTelemetry auto-instrumentation for Symfony adds zero-code tracing to your app, capturing HTTP requests, console commands, and framework activity as spans so you can send telemetry to any OpenTelemetry backend.
Architecture fit — this is the headline risk: it is the wrong framework. open-telemetry/opentelemetry-auto-symfony instruments the Symfony HttpKernel / Console / HttpClient stack. Laravel does not use those components for its request lifecycle — it uses Illuminate\Foundation\Http\Kernel, its own console kernel (Illuminate\Console\Kernel), and Guzzle/curl for outbound HTTP. Installing this package in a Laravel application yields, at best, spans for a handful of indirect Symfony contracts (some Laravel internals pull symfony/http-foundation, symfony/console, symfony/process), and, at worst, silently nothing. There is no supported path where this package is the correct production dependency for a Laravel service.
What is genuinely reusable is the pattern, not the package. The OTel PHP auto-instrumentation model is consistent across frameworks:
ext-opentelemetry) provides the hook() / observer API that lets a Composer package instrument userland functions without code changes._register.php autoload file that registers hooks per framework surface.OTEL_* environment variables (OTEL_PHP_AUTOLOAD_ENABLED, OTEL_TRACES_EXPORTER, OTEL_EXPORTER_OTLP_ENDPOINT, sampler and propagator settings).That architecture is a good fit for our platform. The Symfony package is a reference implementation of it, and a useful one to read when evaluating how much span coverage we get "for free" versus how much requires custom middleware.
Integration feasibility for this specific package: low. For a Laravel estate we would substitute open-telemetry/opentelemetry-auto-laravel (same maintainer group, same extension dependency) or go framework-agnostic with the PDO / Guzzle / curl instrumentation packages plus a hand-written middleware. The Symfony package contributes nothing we cannot get from those.
Technical risk signals are weak across the board:
| Signal | Reading |
|---|---|
| Composite score 20.3 | Low; treat as unhealthy or low-confidence |
| Stars 58 | Niche; limited community validation |
| Dependents 0 | Effectively no downstream production proof points |
[READONLY] in description |
Strong indicator the repo is archived and code relocated into the opentelemetry-php-contrib monorepo — i.e. this is a superseded artifact |
| Last release 2026-10-25 | A future-dated release is anomalous; verify against Packagist before relying on any version constraint |
Additional structural risks: the package is only useful in combination with a compiled PHP extension, which means our container images, CI runners, and local dev environments all need that extension built and version-matched to PHP. That is a platform-level change, not a composer require.
Key questions to resolve before committing engineering time:
open-telemetry/opentelemetry-php-contrib. If it is archived, we should not cite it as a dependency anywhere in our architecture.Stack fit. Target Laravel 10/11/12 on PHP 8.2+, OTLP over gRPC or HTTP to an OpenTelemetry Collector, Collector fanning out to our backend of choice. The pieces are:
ext-opentelemetry installed via PECL in the base image, pinned and built in CI.open-otemetry/opentelemetry-auto-laravel (verify exact package name and current version) for request/console/queue spans.open-telemetry/opentelemetry-auto-pdo, ...-auto-guzzle, ...-auto-curl for dependency spans — these carry most of the diagnostic value regardless of framework.open-telemetry/sdk, open-telemetry/exporter-otlp) as the transitive foundation.Migration path. Do not attempt a Symfony-package pilot. Sequence instead:
.env.example. Instrumentation should be a config toggle, not a per-team project.Compatibility considerations to nail down early:
allow-plugins entries — the instrumentation packages install via the Composer plugin mechanism and will be blocked by default on Composer 2.2+.OTEL_PHP_AUTOLOAD_ENABLED=true must be set, or nothing instruments and there is no error. This is the single most common misconfiguration.-slim Debian bases.Sequencing note. The Symfony package's only legitimate role in this plan is as a reading reference during the spike — to understand hook registration and span naming conventions. It should not appear in a composer.json.
Maintenance. The [READONLY] marker implies the package is frozen; any fork we rely on becomes ours to maintain. Budget for tracking the contrib monorepo releases and for re-pinning the PECL extension on every PHP minor upgrade. Treat the instrumentation layer as platform-owned infrastructure with a named owner, not as an application dependency each team manages independently.
Support. Community-only, no SLA, low bus factor evidenced by 58 stars and 0 dependents. Escalation path for a production tracing outage is GitHub issues. If tracing becomes load-bearing for incident response or SLO reporting, that is an unacceptable support posture and argues for a commercial agent or for accepting degraded visibility during instrumentation bugs.
Scaling. Overhead is per-request hook dispatch plus span allocation and export. Expect low single-digit percent latency impact at moderate sampling, but the variance is what bites: export must be batched and non-blocking, and the Collector — not the PHP process — should own tail sampling and backpressure. Watch cardinality on span attributes (user IDs, URLs with path parameters) as the primary cost driver with most backends. Queue workers are the dangerous surface: high-throughput workers generate span volume disproportionate to request traffic.
Failure modes to design for:
traceparent injection is required at those seams.Ramp-up. Roughly one to two engineer-weeks to get the first service instrumented and readable, plus meaningful enablement cost across teams: how to read a waterfall, how sampling interacts with debugging, how to add manual spans for domain-specific operations, and a cost-governance conversation with whoever owns the observability budget. The tooling is the easy part; the change in debugging practice is where adoption succeeds or stalls.
Recommendation. Do not adopt open-telemetry/opentelemetry-auto-symfony. Use it as a design reference only. Evaluate the Laravel-equivalent auto-instrumentation package plus framework-agnostic PDO/HTTP packages against a commercial APM agent on three axes — native-extension build burden, span coverage for queues and DB, and support posture — and make the decision after the two-week spike, not before.
How can I help you explore Laravel packages today?