ccarver/queue-watcher-laravel

Laravel integration for the queue-watcher Go package — emits job telemetry over stdout as newline-delimited JSON.

Maintainers

Package info

github.com/clcarver/queue-watcher-laravel

pkg:composer/ccarver/queue-watcher-laravel

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-07-31 16:24 UTC

This package is auto-updated.

Last update: 2026-07-31 16:34:51 UTC


README

A Laravel package that integrates with the queue-watcher Go process. It hooks into Laravel's queue job lifecycle and emits newline-delimited JSON to stdout so queue-watcher can monitor jobs in real time.

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12

Installation

composer require ccarver/queue-watcher-laravel

Laravel's auto-discovery will register the service provider automatically. No manual registration is needed.

Configuration

Publish the config file if you need to override defaults:

php artisan vendor:publish --tag=queue-watcher-config

This creates config/queue-watcher.php. You can then disable telemetry via your .env without removing the package:

QUEUE_WATCHER_ENABLED=false

How it works

While php artisan queue:work is running, the package listens to Laravel's queue events and writes a JSON line to stdout for each job transition:

{"telemetry":true,"status":"reserved","job_id":"1","job_name":"App\\Jobs\\MyJob","error":null,"time":"2026-01-01T00:00:00+00:00"}
{"telemetry":true,"status":"completed","job_id":"1","job_name":"App\\Jobs\\MyJob","error":null,"time":"2026-01-01T00:00:01+00:00"}
{"telemetry":true,"status":"failed","job_id":"2","job_name":"App\\Jobs\\MyJob","error":"Timeout","time":"2026-01-01T00:00:05+00:00"}

The queue-watcher Go process reads these lines from the worker's stdout pipe.

Telemetry is only active when the application is running in the console (php artisan queue:work) and is a no-op in web requests.

License

MIT