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

goksagun/elastic-apm-bundle

A PHP bundle that adds Elastic APM instrumentation to your application, capturing transactions, spans, errors, and performance metrics for request tracing and bottleneck diagnosis. Simple configuration and lightweight integration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor for the stated target stack. Despite being catalogued under "Laravel/PHP package," goksagun/elastic-apm-bundle is a Symfony bundle. That is a structural mismatch, not a packaging detail:

  • Symfony bundles are discovered and booted by the Symfony kernel via config/bundles.php, and they extend Bundle, Extension, and Configuration classes with compiler passes. Laravel has no bundle loader; it uses Illuminate\Container with service providers and a different boot lifecycle. There is no supported path to register a bundle in a Laravel app.
  • Porting the bundle would mean rewriting its extension/compiler-pass logic as a Laravel service provider — at which point you are no longer consuming the package, you are forking it.

Marginal value even in its native habitat. Elastic APM for PHP is primarily delivered by the native elastic/apm-agent-php C extension, which hooks the engine and auto-instruments HTTP, DB, and curl calls. Configuration is largely php.ini/env driven. A bundle in this space is typically a thin UX layer (config tree defaults, console/Twig subscribers, service tagging). That layer is nice-to-have in Symfony and effectively worthless in Laravel, where the extension plus a small service provider covers the same ground.

Technical risk — high, and concentrated. 1 star, 0 dependents, single apparent maintainer, no community validation. For an observability dependency that sits in the hot path of every request, that is an unacceptable bus factor. Additional unknowns: whether it wraps the extension or a pure-PHP client, its Symfony/PHP version constraints, test coverage, and release cadence.

Key questions

  • Does it depend on the elastic/apm-agent-php extension, or a userland client? This determines whether the runtime requirement is a C extension in the container image.
  • Which Symfony and PHP versions are supported, and is there a CI matrix?
  • What is the actual code surface (config tree, compiler passes, event subscribers)? Small surface = cheap to reimplement.
  • License, release history, and last-commit date versus abandonment.
  • Is there any known Laravel adapter, or has anyone ported it? (Zero dependents suggests no.)

Integration Approach

Stack fit — reject the package, keep the problem. Recommend: install the elastic/apm-agent-php extension directly in the runtime image, configure via environment, and write a ~200–400 line internal Laravel package for framework-aware instrumentation (queue jobs, console commands, custom spans, user/tenant context). This gives you the same outcome with a dependency you control.

Compatibility checks that gate the decision

  • PHP version support in the extension against our runtime.
  • SAPI/runtime model: if the app runs Laravel Octane (Swoole/OpenSwift) or RoadRunner, validate agent behavior under long-lived workers. Persistent worker state and per-request transaction reset are a known hazard area; FPM is the safe baseline.
  • Container image impact: compiling/installing the extension adds build steps and image size.
  • Backend contract: APM Server version vs agent version; secret token handling through our secrets manager, not .env in the image.

Sequencing

  1. Enable extension only in staging; confirm data lands in APM/Kibana.
  2. Measure p50/p95 latency delta and memory per worker vs a control group. Set a go/no-go threshold.
  3. Configure sampling and transaction naming rules before traffic ramps — cardinality blowups are cheaper to prevent than to fix.
  4. Add custom spans for the business-critical paths (queue consumers, outbound integrations).
  5. Build dashboards and SLO alerts; only then decide whether an internal wrapper package is worth productizing for other teams.
  6. Separately evaluate OpenTelemetry PHP as the vendor-neutral alternative, since APM backend choice is a multi-year commitment.

Operational Impact

Maintenance. Consuming the extension only: near-zero, backed by Elastic. Forking or porting this bundle: we own it permanently, with no upstream to rebase against. Strongly prefer the former.

Support. No vendor support for the bundle and effectively no community. Elastic supports the agent; nobody supports this package. Escalation path for a production tracing outage would be internal only.

Scaling. Overhead is per-process memory plus per-request CPU; typically low but measurable, and it multiplies across worker counts. Trace volume drives APM Server storage and cost, so sampling policy is a capacity decision made at rollout, not after. Transaction naming must be normalized or route/ID cardinality will inflate index size.

Failure modes to instrument for

  • Extension absent from an image → silent no-op, dashboards go quiet with no error.
  • Wrong APM Server URL or secret → spans dropped silently.
  • Backend unavailable → agent buffers then discards; application unaffected, visibility lost during exactly the incident you need it.
  • Octane/RoadRunner worker reuse → misattributed or leaking transaction context.
  • Worker/queue processes not inheriting php.ini → partial coverage that looks like a real traffic drop.

Ramp-up. Extension install and baseline config: a day or two for a platform engineer. Custom instrumentation, naming conventions, sampling policy, and dashboards: two to four weeks of team effort. Choosing Elastic APM over OpenTelemetry adds lock-in that should be an explicit, signed-off decision rather than a side effect of adopting a one-star bundle.

Verdict. Do not adopt this package. The 0.185 score and zero dependents are consistent with what the architecture review shows independently: it is a thin, unmaintained Symfony wrapper with no path into a Laravel stack. The elevated opportunity score (4.16) is the useful signal here — the observability gap for Laravel/PHP is real and underserved, which argues for a small internal package on the official agent, or an OpenTelemetry investment, not a dependency on this repository.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core