cboxdk/laravel-queue-metrics
cboxdk/laravel-queue-metrics gives Laravel apps clear visibility into queue performance: job throughput, wait times, failures, and worker activity across Redis, database, and SQS queues. Use its metrics API and dashboard to spot bottlenecks, tune workers, and keep background jobs reliable.
Architecture fit. The package is a Redis-backed queue observability layer for Laravel: it hooks the queue lifecycle, records discovered queues and job classes into Redis sets ({prefix}:discovery:queues, {prefix}:discovery:jobs), applies TTLs to aggregated metrics keys, and exposes an Artisan command (queue-metrics:calculate) plus a RedisMetricsStore abstraction. It sits alongside — not inside — the queue driver itself, so it composes with an existing Redis queue/Horizon topology rather than replacing it. That is a low-coupling shape, which is good: it is an additive dependency, not an architectural commitment.
The v3.5.1 release does not change that shape. It fixes a data-lifecycle defect and trims a redundant read. Both are consistent with the package's core design; neither suggests architectural drift.
Integration feasibility. This is a patch release on 3.5.0. No new configuration surface, no schema change, no API removal. Composer-level upgrade is trivially feasible; the real feasibility question is infrastructure, not code: because discovery reads now prune, the Redis connection used by the metrics store must be writable. Any team that pointed this package at a read-only replica — a reasonable choice for an observability tool — now has a topology that contradicts documented behavior. That is the one item a TPM should treat as potentially blocking.
Technical risk.
listQueues() / listJobs() now mutate the keys they read (expireIfPersistent() sets a TTL when the key exists and has none). Any caller that assumed those were pure reads — a dashboard, a health check, a controller — now triggers writes. Risk is low in correctness terms, moderate in blast radius if those calls are frequent or are placed on a replica.aggregated TTL is.aggregated TTL, whether a read against a read-only connection throws or silently no-ops, or the supported Laravel/PHP version matrix.Key questions.
aggregated TTL, and is it configurable per environment?listQueues()/listJobs() called in our own code and in any bundled dashboard? Write amplification on a hot read path matters.~4 Redis round trips per queue saving scale linearly with queue count? What queue counts was it measured against?Stack fit. Appropriate for Laravel services on Redis-backed queues with a genuine need for queue/job inventory and throughput metrics. If the queue backend is not Redis, this package is likely out of scope — confirm before spending review time. If the team already runs Horizon, evaluate overlap: Horizon covers much of the operational view, and the marginal value here is historical/aggregated metrics, not live introspection.
Migration path. Treat this as two separate migrations:
aggregated TTL after first touch, and decide whether that is acceptable or whether we should flush the discovery keys once at cutover for a clean slate.Compatibility. Verify PHP and Laravel version constraints against our platform before committing. Confirm the Redis client (predis vs phpredis) and Redis server version support EXPIRE-style TTL semantics the store relies on — the package clearly depends on TTL introspection, so this is not a formality.
Sequencing.
listQueues() / listJobs() and classify each as hot-path or cold-path.Maintenance. Low. Patch-level upgrade, no config changes required, no data migration script. The package is now on a track where discovery keys self-expire, which reduces long-run operational entropy — a genuine improvement over the pre-2.0 behavior the notes describe, where every retired job class accumulated forever.
Support. The documentation additions are the most operationally useful part of this release: they convert three implicit assumptions into stated ones (writable connection, only job start marks a queue seen, version-skew visibility). Support burden should drop if teams read them. Realistically, the read-only-replica constraint will be discovered by someone at 2am unless we surface it in our own runbook.
Scaling. The queue-metrics:calculate change — reading the discovered job list once per run rather than once per queue — is a real if modest win, roughly four Redis round trips saved per queue after the first. On a fleet with dozens of queues this is meaningful during scheduled calculation; on three queues it is noise. The saving is in command runtime, not steady-state request latency, so expect it to matter for batch windows and Redis load, not for user-facing p99.
Failure modes.
listQueues() sits behind a frequently-polled dashboard, every poll now performs TTL writes on the primary.aggregated TTL after backfill. Not a bug, but it will be reported as one.Ramp-up. Small. An engineer familiar with Laravel queues and Redis needs under an hour with the docs to operate this safely. The non-obvious knowledge is concentrated in two facts — reads mutate, and discovery is pruned by reading — and both are now documented. The risk is not skill, it is that the read-only-replica constraint lives in prose rather than in a startup check or a config validation, so it can be missed by anyone who does not read the discovery page.
How can I help you explore Laravel packages today?