What Horizon actually does
Horizon is a Redis-backed real-time dashboard for Redis queues. It provides:
- Live queue depth per queue
- Throughput (jobs/minute) per queue
- Worker process status
- Failed jobs list with retry
- Per-job-class runtime metrics (recent window)
- Pending-job wait-time snapshot
It's tightly coupled to Redis — the data structures it relies on (sorted sets, hashes) are Redis-native. That's why it doesn't work with other drivers.
Option A — DIY queue monitoring
Listen to Laravel's queue events and write every job attempt to a database table:
app/Providers/EventServiceProvider.php
use Illuminate\Queue\Events\JobProcessed;
use Illuminate\Queue\Events\JobFailed;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\DB;
Event::listen(function (JobProcessed $event) {
DB::table('job_attempts')->insert([
'job_class' => $event->job->resolveName(),
'queue' => $event->job->getQueue(),
'connection' => $event->connectionName,
'status' => 'processed',
'attempted_at' => now(),
]);
});
Event::listen(function (JobFailed $event) {
DB::table('job_attempts')->insert([
'job_class' => $event->job->resolveName(),
'queue' => $event->job->getQueue(),
'status' => 'failed',
'exception' => $event->exception->getMessage(),
'attempted_at' => now(),
]);
});Build a simple Livewire dashboard on top. Works, but now you own: the schema, the retention policy, the aggregation queries, the UI, and the on-call for when the monitoring itself breaks. Cheap in dollars, expensive in time.
Option B — Full APM with cross-driver queue monitoring
Laravel's nightwatch package records every job attempt automatically across all drivers. NightOwl consumes that data and surfaces it as a proper queue monitoring dashboard:
- Per-job-class count, p95 duration, failure rate
- Per-queue throughput and lag (dispatch-to-start time)
- Per-attempt detail with full exception context
- Retry visibility — see every attempt, not just the terminal state
- Alerts on failure-rate spikes or queue-lag growth
The tradeoff vs Horizon: APMs are near-real-time (seconds of lag), not instant. For live "is the queue draining right now" views, Horizon on Redis remains unmatched. For historical trending and cross-driver coverage, APMs win.
When to keep using Horizon
If you're on Redis and only need real-time views, stick with Horizon — it's free and purpose-built. Add a tool like NightOwl when you need:
- Historical data beyond Redis retention
- Queue monitoring integrated with request, query, and exception monitoring
- Alerting that doesn't require extending Horizon yourself
- Multi-driver coverage if parts of your stack use SQS or database queues
THE EASY WAY
NightOwl records every job attempt across every queue driver
Works with database, Redis, SQS, Beanstalkd, or any Laravel queue driver. Per-class dashboards show throughput, p95 duration, and failure rate over time. Click into a class to see every attempt with full exception context. Complements Horizon if you're on Redis; replaces it if you're not.
composer require nightowl/agent
php artisan nightowl:installFrom $5/month flat. Data in your PostgreSQL.