Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Laravel Horizon Handles Long Waits; Prometheus Adds Custom Rules

Horizon natively sends long-wait notifications and offers queue metrics. Prometheus adds time-series collection and custom rule-based alerting through an exporter.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Laravel Horizon can notify you when jobs wait too long, and it includes a dashboard for queue and job metrics. Prometheus adds time-series collection and rule-based alerting, but Horizon metrics need an exporter or instrumentation layer to reach it. For a team that needs only long-wait notifications and Horizon’s dashboard, Horizon may be enough; Prometheus is useful when you need broader monitoring, custom alert rules, or a shared metrics system.

What Laravel Horizon alerts on by itself

Horizon’s native notification feature is for long queue waits. You can route these notifications to mail, Slack, or SMS from the application’s HorizonServiceProvider using Horizon::routeMailNotificationsTo, Horizon::routeSlackNotificationsTo, and Horizon::routeSmsNotificationsTo. Laravel documents the configuration in its Horizon notifications guide.

As an Amazon Associate I earn from qualifying purchases.

Set wait thresholds in config/horizon.php, keyed by Redis connection and queue. Laravel’s current documentation says an unspecified connection/queue pair defaults to 60 seconds; setting a queue’s threshold to 0 disables its long-wait notification. The documented values—30 seconds for redis:critical, 60 for redis:default, and 120 for redis:batch—are examples, not universal recommendations. Choose thresholds based on the queue’s purpose and the delay your application can tolerate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

These notifications are specifically about waiting time. They are not, by themselves, a general alerting system for every condition such as a sustained backlog, failure rate, or an inactive Horizon process.

What Horizon’s metrics dashboard shows

Laravel describes Horizon’s dashboard as providing information about job and queue wait times and throughput. To populate its metrics graphs, schedule horizon:snapshot to run every five minutes, as shown in the Horizon metrics documentation.

The metrics.trim_snapshots setting limits the number of stored snapshots, not their age. Consequently, how much history the dashboard represents depends on the snapshot schedule and the configured count.

What Prometheus adds

Prometheus collects and stores timestamped time series, can attach key-value labels, and evaluates rules to record derived series or generate alerts. That makes it possible to define conditions beyond Horizon’s built-in long-wait notification. Prometheus’ overview and exporter guidance explain the collection model: an application generally needs an exporter or direct instrumentation to expose metrics in a format Prometheus can scrape.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Horizon does not provide a built-in Prometheus integration. One third-party option, Spatie’s laravel-prometheus Horizon collectors, documents collectors for:

  • Master supervisor count: horizon_master_supervisors.
  • Running processes by queue: horizon_current_processes.
  • Waiting jobs by queue: horizon_current_workload.
  • Recently failed jobs: horizon_failed_recent_jobs.
  • Horizon state—running, paused, or inactive: horizon_status.
  • Jobs processed in the last minute: horizon_jobs_per_minute.
  • Recent jobs: horizon_recent_jobs.

The package documents enabling these collectors through its Prometheus service provider. Its documented default endpoint is /prometheus, configurable in config/prometheus.php. It also supports an IP allow-list to restrict access. These details describe that package’s documented implementation, not every exporter; check the compatibility and metric definitions for the specific package version you deploy.

Horizon alone or Horizon with Prometheus?

Need Horizon alone Horizon with Prometheus and an exporter
Long-wait notifications Native mail, Slack, and SMS routing with thresholds per connection and queue. Rules can use exported metrics; notification routing depends on the surrounding Prometheus alerting setup.
Queue dashboard and history Built-in dashboard; schedule snapshots to populate metrics, with retention limited by snapshot count. Prometheus collects time series and evaluates rules. Visualization and retention depend on the deployed stack.
Horizon-specific visibility Dashboard metrics include wait times and throughput. The cited Spatie package documents process, workload, status, failure, throughput, and recent-job collectors.
Operational setup Configure notification destinations and thresholds; schedule snapshots if using metric graphs. Add and maintain an exporter or instrumentation layer, configure scraping and rules, and secure the metrics endpoint.

How to expose Horizon metrics to Prometheus

  1. Choose an integration. Select an exporter or instrumentation package that supports the Laravel and Horizon versions you run. For the Spatie option, follow its installation and setup documentation and enable the Horizon collectors through its service provider.
  2. Configure and protect the metrics endpoint. With the cited package, the documented default is /prometheus, and the endpoint can be restricted with an IP allow-list. Do not make metrics publicly accessible without deliberate access controls.
  3. Configure Prometheus to scrape the endpoint. Follow Prometheus’ exporter and scrape configuration guidance for your deployment. Confirm that the metrics appear with the expected names and labels before using them in rules.
  4. Define useful alert conditions. Decide what queue wait, workload, failure activity, or inactive status means for your service. Prometheus guidance recommends clear metric names and base units, and cautions that labels can create high cardinality. See its instrumentation practices.
  5. Set up alert delivery. Create rules for the conditions you care about and configure the alerting components and routing for your environment. Exporting metrics alone does not determine who receives an alert or when.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Compatibility and decision points

Laravel’s current Horizon documentation is for version 13.x. A Redis compatibility caveat in Laravel’s Horizon 12.x documentation should not be assumed to describe every current deployment: that version’s documentation says Horizon requires Redis and is incompatible with Redis Cluster. Check the documentation for the Laravel and Horizon versions actually installed before making an infrastructure decision; see the Laravel 12.x Horizon documentation.

  • Use Horizon alone when its long-wait notifications and dashboard cover the conditions your team needs to see.
  • Consider Prometheus when you need custom, rule-based alerts or want Horizon metrics alongside those from other services.
  • Before adding an exporter, evaluate its compatibility, metric coverage, alert-routing needs, history and retention requirements, and endpoint security.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.