Weave Code
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 Php Agent Laravel Package

philkra/elastic-apm-php-agent

PHP agent for Elastic APM that instruments your application to capture transactions, spans, errors, and performance metrics. Sends telemetry to Elastic APM Server for tracing and monitoring, with support for web and CLI workloads and configurable sampling.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Observability Roadmap: Accelerates adoption of distributed tracing and centralized error monitoring, aligning with a shift toward SRE-driven reliability and proactive issue resolution.
  • Build vs. Buy: Avoids reinventing APM instrumentation for PHP/Laravel, reducing dev effort and technical debt. Leverages Elastic’s mature ecosystem (Kibana dashboards, alerting, etc.).
  • Performance Optimization: Enables latency breakdowns (e.g., DB queries, HTTP calls) to identify bottlenecks in microservices or monoliths.
  • Incident Response: Provides context-rich error tracking (stack traces, user data, environment metadata) to reduce MTTR for production issues.
  • Compliance/Visibility: Supports audit trails (e.g., tracing sensitive operations) and SLA monitoring via Elastic APM’s service-level dashboards.
  • Multi-Environment Scaling: Centralizes telemetry for dev/staging/prod, enabling consistent debugging across deployments.

When to Consider This Package

Adopt If:

  • Your Laravel/PHP stack lacks observability and you need low-overhead tracing without deep instrumentation.
  • You’re already using Elastic Stack (Elasticsearch, Kibana) and want seamless integration for APM dashboards/alerts.
  • Your team prioritizes error context (e.g., user sessions, request payloads) for debugging production failures.
  • You need to trace external calls (HTTP, queues, DB) to debug latency in distributed systems.
  • You’re evaluating open-source alternatives to commercial APM tools (e.g., New Relic, Datadog) with MIT license.

Look Elsewhere If:

  • Your stack is not PHP/Laravel (e.g., Node.js, Python) or requires multi-language support (consider OpenTelemetry).
  • You need active maintenance (package is archived; evaluate forks like elastic/apm-agent-php).
  • Your observability needs include log aggregation (consider Laravel Logs + ELK or Fluent Bit).
  • You require real-time metrics (e.g., Prometheus) alongside tracing (combine with prometheus/client_php).
  • Your team lacks Elasticsearch expertise (setup complexity may outweigh benefits).

How to Pitch It (Stakeholders)

For Executives:

"This package lets us instrument Laravel apps with minimal effort to track performance bottlenecks and errors in production—without building a custom solution. By integrating with Elastic APM, we’ll get centralized dashboards, automated alerts, and end-to-end tracing for faster incident response. It’s a low-risk, high-reward way to improve reliability, especially if we’re already using Elasticsearch. The MIT license avoids vendor lock-in, and the overhead is negligible."

Key Outcomes:Reduce MTTR with contextual error tracking. ✅ Optimize performance via latency breakdowns (DB, HTTP, queues). ✅ Align with SRE goals with standardized observability.


For Engineering:

*"This is a drop-in APM agent for Laravel that:

  • Auto-captures transactions (web/CLI) and spans (DB, HTTP, queues).
  • Reports exceptions with stack traces and custom metadata (e.g., user IDs).
  • Works with Elastic APM for dashboards, service maps, and alerts.

Why use it?

  • No reinventing the wheel: Handles instrumentation, batching, and Elastic Stack compatibility.
  • Lightweight: Designed for production with minimal performance impact.
  • Extensible: Add custom spans for business logic (e.g., payment processing).

Trade-offs:

  • Archived repo: Prefer elastic/apm-agent-php if active updates are critical.
  • Elastic dependency: Requires Elasticsearch/Kibana setup (but we can scope this as a PoC first).

Proposal:

  1. PoC: Instrument a high-traffic Laravel service (e.g., API gateway).
  2. Validate: Confirm dashboards/alerts meet our needs.
  3. Expand: Roll out to other services if successful.

Alternatives considered:

  • OpenTelemetry PHP: More future-proof but higher setup complexity.
  • Commercial APM: Overkill for our scale and budget."*
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.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope