sandermuller/laravel-queue-insights
Laravel Queue Insights provides visibility into your Laravel queues, helping you monitor job activity, failures, and worker health so you can spot bottlenecks and troubleshoot background processing faster. A lightweight way to keep queue performance in view.
composer require sander-muller/laravel-queue-insights, then publish and open config/queue-insights.php. That file is the whole surface area — read it before anything else, especially redis_connection and the chain_lineage block.queue-insights.redis_connection (env QUEUE_INSIGHTS_REDIS, default default). If your app already uses default for cache/sessions/queues, decide now whether telemetry belongs there or on a dedicated connection — switching later means re-pointing the env var and losing history on the old connection.schedule:run / schedule:work). All three processes need the same QUEUE_INSIGHTS_REDIS value and Redis reachability. Run php artisan config:clear after touching the env.storage/logs/laravel.log, not as an exception in your request.Zero-instrumentation baseline. The listeners for jobs and scheduled tasks are registered by the package's service provider; you don't add trait or middleware calls to your jobs. Get the config right, keep workers and the scheduler running, and insights accumulate. Reach for per-job customisation only after the baseline is working.
Dedicated connection for telemetry. A common day-to-day setup is a second connection under database.redis (often a separate logical database or a separate instance) and QUEUE_INSIGHTS_REDIS=insights. This keeps insight writes off the connection your queues and cache depend on, so a slow telemetry write can't add latency to a cache miss.
Hand-written connection blocks. If you define the connection by hand rather than copying the default block, it must carry everything default carries — notably url (or username) alongside password. On a managed Redis using ACL auth, omitting username produces WRONGPASS at write time, now identifiable in the log via the redis_connection context field.
Split lineage from telemetry. chain_lineage.redis_connection overrides the global connection for chain-lineage tracking. Use it when chain data is written from a different process group or you want lineage retained longer than the per-job records. It goes through the same boot-time validation as the main key.
Multi-environment rollout. Because the connection name is validated at boot from 0.34.0 onward, treat QUEUE_INSIGHTS_REDIS as a deploy-blocking config value: set it explicitly in every environment (including CI and local), or leave it unset so the default fallback applies. Don't rely on it being "probably fine" in staging.
queue-insights.redis_connection (or chain_lineage.redis_connection) that matches no top-level key under database.redis throws immediately, naming the value and listing the connections that are defined. This is a deliberate trade: previously the mistake surfaced much later from inside a listener or the schedule sweeper, with a message that never mentioned the requested name. Expect a deploy to fail loudly if an env var is typo'd — that's the feature working.database.redis block is missing entirely, the package stays out of the way and lets Laravel report it. So a boot that succeeds doesn't prove telemetry is wired up; verify by running one job.redis_connection, which is the fastest way to tell a WRONGPASS on a managed instance from a genuine outage.config/database.php → redis.connections. That key doesn't exist in Laravel — connections are top-level keys of redis. If you're on an older published config file, re-publish or hand-edit it; the stale comment has sent people looking in the wrong place.QUEUE_INSIGHTS_REDIS without php artisan config:clear (or re-caching in deploy) leaves workers on the old connection while the web process uses the new one — you get partial data and no error at all.chain_lineage override, and whatever retention/sampling keys the published config exposes. Prefer overriding there over swapping package internals.How can I help you explore Laravel packages today?