horizonhub/agent
HorizonHub Agent is a Laravel package that runs a lightweight agent to collect and report application and server metrics, health checks, and environment details back to HorizonHub for centralized monitoring, alerts, and visibility across multiple apps and deployments.
laravel/horizon) to be already integrated into the stack. If Horizon is not used, this package is irrelevant.job.* events. Custom event filtering or transformation may be needed if Horizon Hub expects a specific payload schema.Use Case Justification:
API Contract:
Failure Modes:
Extensibility:
Alternatives:
env() or a secrets manager).composer require horizonhub/agent.config/horizon.php or via service provider bindings.JobProcessed, JobFailed) may need mapping to Horizon Hub’s schema. Custom events will require additional configuration.HORIZON_HUB_API_KEY and similar. Ensure these are injected via Laravel’s .env or a config file.composer require laravel/horizon.AppServiceProvider or a dedicated config file.Horizon::on('job.*', function ($event) {
app(\HorizonHub\Agent\Agent::class)->push($event);
});
horizonhub/agent for updates. Major version bumps may require testing due to potential API changes in Horizon Hub.tap or dump() for debugging event payloads before they’re sent.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Horizon Hub API downtime | Lost job telemetry; potential alert storms | Local caching + retry logic; fallback logging |
| Network partition between Laravel and Horizon Hub | Delayed/failed events | Circuit breaker pattern; exponential backoff |
| Malformed event payloads | Rejected events; noise in Horizon Hub | Input validation in agent; schema tests |
| Laravel queue worker crashes | No events processed | Supervisor restarts; health checks |
| API rate limiting on Horizon Hub | Throttled events | Batching; request queueing |
How can I help you explore Laravel packages today?