- Is itk-dev/metrics-bundle a Laravel package?
- No. itk-dev/metrics-bundle is a Symfony bundle built around Symfony's DI container, compiler passes, tagged collectors, and bundle routing. Laravel's service providers and router do not consume that wiring, so it is not a drop-in Laravel package. Treat it as a Symfony-scoped tool or a reference implementation for a Laravel metrics endpoint.
- Can I install itk-dev/metrics-bundle in a Laravel application?
- You can require it with Composer, but the bundle's convenience layer will not activate in Laravel. Integration means either using only its non-Symfony classes as a plain PHP library and hand-wiring collectors, a service provider, and a route, or forking it to add a MetricsServiceProvider. Expect a spike plus a small internal integration, not a drop-in install.
- What Laravel and PHP versions does itk-dev/metrics-bundle support?
- It does not declare Laravel support at all, because it is a Symfony bundle. The last release was July 2022, and a bundle from that era typically pins PHP around 8.0/8.1 and Symfony 5.4/6.x, with no guarantee for PHP 8.3/8.4, Laravel 10/11, or Symfony 7. Check composer.json constraints before assuming compatibility.
- How do I expose a /metrics endpoint in Laravel?
- The common Laravel path is spatie/laravel-prometheus, or a thin route backed directly by promphp/prometheus_client_php. Either approach gives you a Prometheus text-format response at /metrics without adopting Symfony bundle wiring. A small service provider plus a route is usually all the glue you need.
- What is the difference between itk-dev/metrics-bundle and spatie/laravel-prometheus?
- itk-dev/metrics-bundle is a Symfony bundle with a Bundle class, DI compiler passes, tagged collectors, and a bundled routing file. spatie/laravel-prometheus is Laravel-native and plugs into service providers, configuration, and routes the way Laravel applications expect. For a Laravel codebase, the Spatie package is the lower-friction choice; the ITK package is better read as a design reference.
- Does itk-dev/metrics-bundle work with Prometheus and Grafana?
- Yes, its core value is a Prometheus text-format exposition endpoint on top of promphp/prometheus_client_php, which standard scrapers can collect. Grafana can then visualize the scraped series as usual. Without a Prometheus server or compatible scraper, the bundle produces metrics that nothing consumes, so the total-cost argument disappears.
- Which storage backend should I use for metrics under PHP-FPM?
- In-memory storage is per-request and therefore useless for cross-request counters under PHP-FPM. APCu works per host but fragments across multiple servers, while Redis gives cross-host visibility at the cost of a network dependency during scrapes. Decide what happens if that backend is down during a scrape, and check whether you have cardinality controls plus Histogram/Summary support before you risk label explosion.
- Is itk-dev/metrics-bundle maintained and safe for production?
- It has 0 stars, 0 dependents, and its last release was July 2022, with no security patching, issue triage, PHP 8.3/8.4 guarantee, or Symfony 7 support. It is a team utility scoped to the ITK development team and is dormant by design, not by accident. The MIT license makes forking legally clean, but that does not reduce the maintenance load or the key-person risk.
- How do I install and configure itk-dev/metrics-bundle in Symfony?
- Install it with Composer, register the bundle in bundles.php, and configure collectors and storage through your Symfony configuration. Register metric collectors as tagged services, then import the bundle's routing file to expose the scrape endpoint. Verify your PHP and Symfony version constraints clear your platform floor before committing.
- What are the alternatives to itk-dev/metrics-bundle for Laravel observability?
- Use spatie/laravel-prometheus if you want Prometheus metrics with Laravel-native wiring, or promphp/prometheus_client_php with roughly 100 lines of glue if you prefer to own the integration. Laravel Pulse is a good fit for an application health dashboard but is not a Prometheus exposition layer. For Symfony projects, evaluate actively maintained Symfony metrics bundles instead of this dormant one.