Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Elastic Apm Bundle Laravel Package

spacespell/elastic-apm-bundle

Symfony bundle for integrating Elastic APM into PHP apps, with request tracing, transactions, spans, error capture, and performance monitoring. Sends APM data to Elasticsearch/Kibana with minimal configuration for better observability.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Despite being catalogued as a Laravel/PHP package, spacespell/elastic-apm-bundle is a Symfony bundle that wraps the Elastic APM PHP agent and hooks into Symfony’s HTTP kernel, event dispatcher, Doctrine, and Twig. Laravel uses Symfony components but not the full-stack Symfony runtime or bundle system, so the bundle’s auto-instrumentation does not map cleanly to Laravel middleware, service providers, queues, or Artisan commands. For a Laravel application, this is an indirect fit at best and likely requires a custom bridge or fork.
  • Integration feasibility: Feasible for a Symfony 4/5 application on PHP 7.x, assuming the Elastic APM PHP agent and APM Server are already available. For Laravel or modern PHP 8.x stacks, feasibility is low without forking: the 2020 release predates PHP 8, Laravel 9+, and current Elastic APM agent versions. Apache-2.0 licensing permits a fork, but the team would own compatibility work.
  • Technical risk: High due to abandonment risk. Last release was 2020-01-21, there are zero dependents, and no evidence of active maintenance, CI, or a security response process. Compatibility with current PHP, Symfony, Laravel, and Elastic APM agent versions is unverified. The bundle may also introduce PHP extension or agent-version conflicts, and its event-listener model may miss Laravel-specific request lifecycle and queue behavior. The 125 stars and 0.805 score indicate some historical interest but weak production validation.
  • Key questions: Is the target stack actually Symfony or Laravel? Which PHP, Laravel/Symfony, and Elastic APM agent versions are in scope? Is Elastic APM already the approved observability backend, or is OpenTelemetry preferred? Can we use the official Elastic APM PHP agent directly with thin Laravel middleware instead of this bundle? Who will own a fork if PHP 8+ support is required? What is the acceptable observability overhead and data-retention policy?

Integration Approach

  • Stack fit: If the application is Symfony, evaluate the bundle as a thin convenience layer over the official Elastic APM PHP agent. If the application is Laravel, do not adopt this bundle directly; instead use the official Elastic APM PHP agent with a Laravel middleware and service provider, or standardize on OpenTelemetry. The bundle should be treated as a reference implementation, not a Laravel integration.
  • Migration path: Run a time-boxed spike in a non-production environment. Install the official Elastic APM PHP agent first, configure APM Server URL, secret token, service name, and environment, then compare transaction and error capture against the bundle’s behavior. If the bundle is retained, pin PHP and Symfony versions, fork it into an internal namespace, and add PHP 8+ and dependency compatibility before any production use.
  • Compatibility: Verify the Elastic APM PHP agent compatibility matrix against the runtime PHP version and framework version. Check whether the bundle’s Symfony event subscribers and dependency constraints can coexist with Laravel’s Symfony component versions. Expect to update or replace Composer constraints. Confirm that queue workers, scheduled tasks, and CLI commands are instrumented separately.
  • Sequencing: 1) Confirm framework and runtime versions. 2) Decide between the bundle, the native agent with custom Laravel middleware, or OpenTelemetry. 3) Prove the chosen path in staging with representative traffic. 4) Define instrumentation scope: HTTP transactions, database queries, exceptions, queues, and external calls. 5) Roll out canary-first with sampling enabled. 6) Document fallback and disablement procedures before broad rollout.

Operational Impact

  • Maintenance: Treat this as internally owned software if adopted. The upstream release is over six years old and has no dependent ecosystem, so the team must budget for fork maintenance, dependency upgrades, and PHP/framework compatibility patches. A quarterly review of agent and APM Server compatibility is prudent.
  • Support: No commercial support or active maintainer is evident. Apache-2.0 allows modification, but the team must create its own runbook, upgrade process, and security review. Internal support load will be higher than with the official Elastic agent alone.
  • Scaling: APM overhead depends on sampling, transaction volume, and APM Server capacity. The bundle does not remove the need to tune sampling rates, agent memory limits, and queue-worker instrumentation. At scale, uninstrumented queue consumers and CLI jobs can create blind spots, and high-cardinality transaction names can strain the APM backend.
  • Failure modes: The agent must fail open so APM Server outages or misconfiguration do not take down the application. Watch for PHP extension conflicts, agent-to-server connectivity failures, memory growth, dropped transactions, and missing exception capture. The 2020 bundle may also break silently on newer framework versions because its event hooks no longer fire. Add health checks and a kill switch for the agent.
  • Ramp-up: Expect one to two days for a proof of concept and one to two weeks for production hardening if a fork or Laravel bridge is required. The team needs familiarity with Elastic APM concepts, Symfony event listeners, Laravel middleware, and PHP agent configuration. If the organization is standardizing on OpenTelemetry, the ramp-up cost should be redirected there instead.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator