troopers/metrics-bundle
A PHP metrics bundle for collecting, aggregating, and exposing application metrics. Plug it into your app to track performance and business indicators, then serve them to dashboards or monitoring tools through a simple, configurable setup.
Architecture fit — mismatch, not merely friction. The package is a Symfony Bundle (Troopers\MetricsBundle), not a Laravel package. That distinction is structural, not cosmetic: a Symfony bundle ships a *Bundle class, a DependencyInjection/*Extension that loads XML/YAML service definitions, compiler passes, and config trees (Configuration.php). Laravel has no bundle kernel, no DI extension loading, and no compiler passes. Every service the bundle wires would need to be re-registered manually in a Laravel service provider, and its configuration tree re-expressed as a published config/metrics.php. There is no laravel/framework service provider to auto-discover, no facade, no package manifest (composer.json extra.laravel). The practical outcome is that you are not "integrating" this package — you are vendoring it as a source of design intent and re-implementing its wiring.
Integration feasibility — low. Composer constraints almost certainly target PHP 5.6/7.0–7.1 and Symfony 2.8/3.x. A modern Laravel application (PHP 8.2+, Laravel 10/11) will fail dependency resolution outright, meaning install itself requires --ignore-platform-reqs and a fork. Even with a fork, the bundle's extension classes may reference Symfony components (symfony/config, symfony/dependency-injection, symfony/http-kernel) at versions with removed or renamed APIs. Feasibility therefore hinges on how thin the actual runtime logic is versus how much lives in container wiring. If the metric-collection logic is a handful of small classes behind an interface, porting is a day or two; if it is entangled with EventDispatcher and HttpKernel event subscribers, it is not worth the port.
Technical risk — high, concentrated in three places.
Key questions to resolve before spending engineering time:
spatie/laravel-prometheus, OpenTelemetry PHP, league/statsd) that covers 80% of the intent?Stack fit — none out of the box. Laravel's observability surface is already well served by laravel/telescope, Pulse (first-party, since Laravel 10/11), Monolog channels, and OpenTelemetry auto-instrumentation. A Symfony bundle contributes nothing to that stack and competes with first-party tooling that is actively maintained. The honest framing for stakeholders: this is not a "Laravel package with a rough edge," it is a package from a different framework ecosystem.
Migration path — treat as reference implementation, not dependency. Recommended sequence:
Resources/config/services.yml and the collector classes. Extract the metric taxonomy — which counters, gauges, and timings it models — rather than the code. That taxonomy is the only durable artifact.spatie/laravel-prometheus if the target is a Prometheus/Grafana stack. If the bundle was a StatsD shim, league/statsd covers it in an afternoon.app/Support/Metrics — not as a Composer dependency — only if a specific collector implements non-trivial aggregation logic worth preserving verbatim. Strip the DI extension, swap Symfony interfaces for Laravel contracts, and pin it with tests.Compatibility. No Laravel version is compatible. No PHP 8.x compatibility is asserted. No composer.json extra.laravel.providers entry means no package discovery — manual registration, which is moot given the bundle structure. Assume zero compatibility and validate nothing until you have read the source.
Sequencing. Decision gate first (does the intent duplicate Pulse/OpenTelemetry?), source read second, taxonomy extraction third, backend selection fourth, implementation fifth. Do not let a spike begin with composer require; dependency resolution will fail and the resulting debugging session is a sunk cost.
Maintenance — you own it entirely. There is no upstream release cadence to track, no security response, and no issue triage. Any fork becomes an internal liability on your team's roadmap indefinitely, with no external contributor able to share the load. Contrast this with OpenTelemetry PHP or Laravel Pulse, where PHP 8.3/8.4 compatibility arrives without your involvement.
Support — none. No maintainer SLA, no documented upgrade path, no changelog beyond 2017. When a PHP minor version breaks an internal reflection or a deprecated Symfony call, the fix is yours to diagnose from scratch. Onboarding material is limited to the README as it stood nine years ago.
Scaling — indeterminate and likely modest by design. A 2017-era Symfony metrics bundle was built for request-scoped, synchronous emission — counters and timers flushed at end-of-request. That model does not extend cleanly to queue workers, long-running Octane processes, or high-cardinality labeling. If your scaling requirement includes per-tenant metric dimensions or Swoole/Octane persistence, the bundle's assumptions will actively work against you.
Failure modes to plan for:
Ramp-up — low effort, high risk. The codebase is small enough to read in a few hours, so ramp-up cost is genuinely low. The risk is asymmetric: an engineer will feel productive quickly while porting it, then inherit an unbounded maintenance obligation. Budget the ramp-up against the alternative — an afternoon wiring OpenTelemetry or Pulse — and the comparison is not close.
Recommendation. Do not integrate. Consume this repository as documentation of a metric taxonomy, then implement against a maintained, framework-native observability library. The 0.17 score, 10 stars, zero dependents, and a nine-year-old release all point the same direction: high porting cost, no upstream, no community, and a first-party Laravel alternative that already exists.
How can I help you explore Laravel packages today?