- Can I use myschoolmanagement/elastic-apm-symfony-bundle in a Laravel application?
- Not directly. The package is a Symfony bundle: it registers services through Symfony's dependency injection container and subscribes to kernel.* events, neither of which exists in Laravel's request lifecycle. Installing it in a Laravel app gives you no instrumentation because there is no kernel event dispatcher to hook into. Treat it as a reference implementation for where to place APM listeners, not as a Composer dependency for Laravel.
- How do I add Elastic APM to Laravel if this bundle is Symfony-only?
- Use the official Elastic APM PHP agent (elastic/apm-agent-php), which is framework-agnostic and loaded through php.ini, then configure it with apm-agent settings such as service name, server URL, and sample rate. A Laravel-native wrapper package can layer naming and span enrichment on top. Once transactions appear in Kibana, borrow this bundle's listener placement strategy to add custom spans for your app.
- What changed in version 1.0.6 of elastic-apm-symfony-bundle?
- Version 1.0.6 moves instrumentation to a request-finalization hook instead of instrumenting earlier in the lifecycle. The motivation is to guarantee listeners actually run before the transaction closes. There are no API changes, deprecations, or config schema changes, so it is a low-risk patch. The tradeoff is that any exception or early exit before finish-request can silently drop telemetry.
- Which PHP and Laravel versions does this Elastic APM integration support?
- The bundle itself targets Symfony and its 1.0.x line is patch-stable. For a Laravel target running PHP 8.x on Laravel 10, 11, or 12, the practical dependency is the Elastic APM PHP agent rather than the bundle. Verify the agent version against your PHP runtime, and test explicitly if you run Laravel Octane, since long-lived workers change what finish-request means.
- How do I port this bundle's request-finalization listener into a Laravel service provider?
- Register a terminable middleware or an app()->terminating() callback in a service provider so spans and the transaction close at the end of the request, mirroring the 1.0.6 placement. Map the bundle's configuration keys into a config/elastic-apm.php file and keep the names close to upstream so future diffs stay readable. This is a small, well-bounded effort: one provider, one or two listeners, and config mapping.
- Does this bundle cover queue jobs, console commands, and sub-requests?
- No. The bundle is built around Symfony's HTTP kernel events, so it instruments the main request lifecycle. Queue workers, scheduled commands, and other background work need their own instrumentation, which in Laravel means custom spans inside job middleware or command hooks. Decide up front whether HTTP transaction parity is enough or whether you need job and console coverage too.
- What are the alternatives to this Symfony bundle for Elastic APM in PHP?
- The main paths are the official Elastic APM PHP agent for ingestion, a Laravel-specific APM wrapper for framework ergonomics, or OpenTelemetry with an OTLP exporter if your backend is not Elastic. The agent is the lowest-effort option because it is framework-agnostic and already works with Laravel. This bundle is a useful design reference for listener timing, not a replacement for those options.
- Is this bundle safe for production and how risky is its maintenance?
- The technical risk in 1.0.6 is low: no API changes and no config schema changes, and the patch is semver-respecting. The larger concern is upstream maturity, since this is a single-vendor bundle with a small contributor base and a rapid patch cadence from 1.0.5 to 1.0.6. Pin the version, review diffs before upgrading, and plan who owns patching if you port the listener pattern instead of depending on it.
- Can I use this Elastic APM bundle with Laravel Octane?
- The bundle is Symfony-oriented, so it does not address Octane directly, but the same concern applies to any APM setup on long-lived workers. Under Octane, a request is not a process, so transactions must be explicitly reset and finalized per request rather than relying on process shutdown. Test that spans do not leak between requests and that transaction names stay accurate under concurrency.
- How do I verify Elastic APM transactions and errors are actually being reported?
- Instrument a staging environment first and confirm transactions appear in the Kibana APM UI before touching production. Check transaction naming, span coverage, and that error events carry useful stack traces. Start production at a low sample rate and raise it once you have validated that the finalization hook fires on exception paths as well as successful responses.