- How do I install and test lkaemmerling/laravel-horizon-prometheus-exporter?
- Install it with Composer using composer require lkaemmerling/laravel-horizon-prometheus-exporter. You can optionally publish the package config with vendor:publish, then add a Prometheus scrape job for the metrics endpoint. To test it, request the endpoint directly and confirm it returns Prometheus text format metrics before wiring alerts or Grafana.
- Does this package support Laravel 13 and which Laravel versions can I use?
- Version 1.8.3 is a Laravel 13.x compatibility release, so it is intended to work with Laravel 13. Before pinning it, check the package composer.json for the exact illuminate/* and PHP constraints. Also verify whether Laravel 11 and 12 remain supported, because a Laravel 13 compatibility release may widen or replace the previous constraint.
- Do I need Laravel Horizon and Redis to use this exporter?
- Yes. The exporter is built for Laravel Horizon and derives metrics from Horizon's repositories and Redis key structures. It is relevant to Redis-backed queues managed by Horizon, and teams using database, SQS, or other queue drivers get no value from it.
- How do I configure Prometheus to scrape Laravel Horizon metrics?
- The package exposes an HTTP endpoint in Prometheus text format, so you add a scrape job in your Prometheus configuration that targets that route. No migrations, schema changes, or job dispatch hooks are required. After scraping starts, you can build Grafana dashboards and alerts from the exported queue metrics.
- Is the metrics endpoint authenticated or protected by Horizon middleware?
- Do not assume it inherits Horizon's authorization. Verify the package route and config to see which middleware applies, because it may be a separate HTTP surface. If it is unauthenticated, gate it with your own middleware or restrict access at the network or reverse-proxy layer.
- Which storage backend does the exporter use for Prometheus metrics?
- The package relies on the underlying Prometheus PHP client, and the in-memory adapter does not survive across PHP-FPM workers. In practice you usually need a shared backend such as Redis or APCu, and that backend choice is the main design decision. Check the package config for the default adapter and whether it is configurable.
- What Horizon queue metrics can I monitor with this exporter?
- The exporter is designed to expose Horizon queue information such as current workload, the number of processes on a queue, jobs, wait times, throughput, and worker health. These metrics let you alert on backlog growth, failures, and stalled workers. The exact metric names and labels should be confirmed from the endpoint output for your installed version.
- How much metric cardinality should I expect per queue and worker?
- Cardinality depends on the metric labels the package emits, especially queue names and any worker-related dimensions. Before scaling workers, inspect the scraped output to see whether label series grow with worker count. High-cardinality labels can increase Prometheus storage and query cost, so plan dashboards and retention accordingly.
- How does this compare with Laravel Horizon's built-in dashboard?
- Horizon's built-in dashboard is human-readable and remains useful for day-to-day inspection. This exporter complements it by making queue metrics scrapeable for Prometheus, Grafana, and alerting. It does not replace Horizon; it adds historical monitoring and automated alerts on top of Horizon's queue data.
- Is this package actively maintained and safe for production monitoring?
- It is a single-maintainer, community-supported package in the monitoring path, with no SLA and low release cadence. The Laravel 13 compatibility update is a mechanical constraint change, not evidence of extensive production testing against Laravel 13. Pin versions, test framework and Horizon upgrades, and monitor the exporter itself so a silent collection failure does not leave dashboards flat.