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

App Metrics Laravel Laravel Package

avto-dev/app-metrics-laravel

Laravel package for collecting and exposing application metrics, with built-in integrations for Prometheus and other backends. Adds middleware and service providers to track requests, responses, and custom counters, helping you monitor performance and health with minimal setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: The package is a thin Laravel adapter over the app-metrics collector: an auto-discovered service provider, a publishable config, a facade for counters/gauges/histograms, request-timing middleware, and a Prometheus-compatible HTTP endpoint. That is the right shape for a Laravel estate — it needs no sidecar, no agent, and no vendor SDK, and it composes with any OpenMetrics-aware backend (Prometheus, VictoriaMetrics, Grafana Agent). The current release line targets Laravel ^11.0 through 13.x, which keeps it inside the framework's supported lifecycle rather than anchoring a service to a legacy branch.

Integration feasibility: Technically low effort for a Laravel 11+ service: one Composer dependency, publish the config, register the scrape route, optionally enable the middleware. The real work is not installation — it is deciding what to measure (naming taxonomy, label cardinality, which endpoints and jobs get instrumented) and where the scrape endpoint lives in the network topology. Applications on Laravel 10 or earlier cannot consume v2.10.0 and must pin to the last compatible release or upgrade the framework first.

Technical risk: Three risks matter to a TPM. First, maturity: 4 stars and a low composite score mean almost no community validation — this is effectively a single-maintainer dependency, so evaluate it against a fork-and-own contingency. Second, semver discipline: the release that dropped Laravel 10 shipped as a minor (2.10.0) rather than a major. Any service with a permissive ^2.0 constraint can silently pull a version that cannot resolve against its framework, so constraints must be pinned and changelogs read. Third, observability surface: an unauthenticated metrics route exposes internal traffic patterns and endpoint names; and unbounded label values (user IDs, raw paths, request IDs) will blow up cardinality and the scrape backend. Laravel 13 support also appears to be a constraint/CI bump, not evidence of production hardening.

Key questions:

  • What is the runtime PHP constraint in composer.json, and does it match our fleet (the Docker image moved to PHP 8.5 — is that contributor tooling only)?
  • Is Laravel 13 GA in our environment, and is the package's CI actually exercising it?
  • Why was dropping Laravel 10 a minor? Should we treat 2.x as non-semver?
  • Who is the second maintainer, and what is our fork/ownership plan if the project stalls?
  • What existing observability do we already pay for (APM, Datadog, OTel), and does this duplicate or complement it?
  • Where will the scrape endpoint sit — internal-only, auth-gated, or service-mesh scoped?

Integration Approach

Stack fit: Best fit is Laravel 11/12/13 on a PHP runtime matching the package's declared constraint, deployed to a scheduler that already scrapes Prometheus-format targets (Kubernetes, ECS, or a static scrape config). It is a poor fit for Laravel ≤10 estates, and a redundant fit for teams already standardized on OpenTelemetry PHP or a commercial APM — in those cases the value is marginal and the second metrics pipeline is a liability.

Migration path: For Laravel 10 estates, pin the package to the last compatible release, complete the framework upgrade, then lift the pin. For Laravel 11/12 estates, treat adoption as a greenfield instrumentation choice, not a migration. If replacing an existing metrics path, dual-publish for one release cycle — keep the old exporter running while the new endpoint is scraped in parallel — then retire the old one after dashboards and alerts are proven on the new source.

Compatibility: Validate the full transitive graph resolves against the exact Laravel minor versions in use, not just the major, and check for packages that cap PHP below the runtime version. Confirm the Prometheus/OpenMetrics text format is accepted by the target backend and that the scrape interval matches the endpoint's cost profile. Confirm the package's metrics registry behaves under Laravel Octane or long-running workers if those are in play — a per-request reset assumption breaks in resident-process runtimes.

Sequencing:

  1. Pin the package everywhere it is currently installed to prevent an unintended 2.10.0 pull.
  2. Audit the fleet: Laravel version, PHP version, existing observability tooling per service.
  3. Publish a metric taxonomy (naming, required labels, cardinality budget) before the pilot.
  4. Pilot on one representative service; wire scrape config, one dashboard, one alert.
  5. Validate cost and cardinality against the metrics backend for two weeks.
  6. Roll out per service via the standard template; retire parallel exporters as each service cuts over.
  7. Treat Laravel 13 adoption as a separate, later workstream.

Operational Impact

Maintenance: The capability itself is small — a config file and instrumentation calls — so ongoing code maintenance is low. The recurring cost is dependency cadence: the package tracks Laravel's annual major rhythm, so expect a constraint-raising release roughly yearly and fold it into the existing Laravel upgrade programme rather than treating it as a standalone chore. The reduced support matrix (no Laravel 10) lowers the maintainer's CI burden, which should improve reliability on supported versions.

Support: This is the weakest dimension. A 4-star, single-maintainer package with a semver ambiguity is a continuity risk, and there is no commercial support path. Mitigate by pinning exactly, vendoring or mirroring the repository, and confirming a fork is buildable in our CI before it becomes an emergency. Establish explicitly how long each Laravel major remains supported and whether security fixes are backported; assume nothing and read each changelog.

Scaling: Runtime impact is negligible relative to the application. The scaling risks are elsewhere: metric cardinality per service (labels multiply series, and series multiply backend cost), scrape volume once dozens of pods are added as targets, and fleet-wide coordination when a package bump invalidates a framework version. Budget a cardinality ceiling per service and review it at rollout; the container/tooling bumps (PHP 8.5, Composer 2.10.0) improve CI reproducibility across many repos, which helps at scale but also signals dev/prod parity drift worth checking.

Failure modes:

  • Composer resolution failure on Laravel ≤10 services pulling a version they cannot run, via a loose constraint.
  • Metrics endpoint accidentally public or blocked by auth middleware, yielding either a data leak or silent scrape gaps.
  • Cardinality explosion from high-entropy label values, degrading the metrics backend and inflating cost.
  • Silent dev/prod drift if the package's Docker PHP 8.5 outpaces the production runtime constraint.
  • Laravel 13 regressions if support is declarative rather than CI-proven.
  • Transitive dependency deadlock when other first-party packages lag the framework bump.
  • Maintainer abandonment — no successor, no fork rehearsal, no replacement plan.
  • Duplicate observability: two metrics pipelines producing divergent numbers and eroding trust in dashboards.

Ramp-up: Low. Any Laravel-fluent engineer can install and instrument in an afternoon; the package introduces no new concepts beyond the Prometheus data model. The TPM's ramp-up work is non-technical: defining the metric taxonomy and ownership, setting the cardinality budget, deciding the endpoint's network posture, and securing a continuity plan. Budget a short discovery spike plus one pilot sprint; full rollout should track the normal service template cadence rather than a dedicated programme.

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