Using Horizon exporters | laravel-prometheus | Spatie

 SPATIE

  Laravel Prometheus
=====================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-prometheus](https://spatie.be/docs/laravel-prometheus/v1)  Basic-usage  Using Horizon exporters

 Version   v1

 Other versions for crawler [v1](https://spatie.be/docs/laravel-prometheus/v1)

  Using Horizon exporters
- [ Introduction ](https://spatie.be/docs/laravel-prometheus/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-prometheus/v1/support-us)
- [ Requirements ](https://spatie.be/docs/laravel-prometheus/v1/requirements)
- [ Installation &amp; setup ](https://spatie.be/docs/laravel-prometheus/v1/installation-setup)
- [ Questions and issues ](https://spatie.be/docs/laravel-prometheus/v1/questions-issues)
- [ Changelog ](https://spatie.be/docs/laravel-prometheus/v1/changelog)
- [ About us ](https://spatie.be/docs/laravel-prometheus/v1/about-us)

Basic usage
-----------

- [ Creating gauges ](https://spatie.be/docs/laravel-prometheus/v1/basic-usage/creating-gauges)
- [ Using Horizon exporters ](https://spatie.be/docs/laravel-prometheus/v1/basic-usage/using-horizon-exporters)
- [ Using Queue exporters ](https://spatie.be/docs/laravel-prometheus/v1/basic-usage/using-queue-exporters)

Setting up Prometheus and Grafana
---------------------------------

- [ Introduction ](https://spatie.be/docs/laravel-prometheus/v1/setting-up-prometheus-and-grafana/introduction)
- [ Using grafana.com ](https://spatie.be/docs/laravel-prometheus/v1/setting-up-prometheus-and-grafana/using-grafana-com)
- [ Self-hosted ](https://spatie.be/docs/laravel-prometheus/v1/setting-up-prometheus-and-grafana/self-hosted)
- [ Using fly.io ](https://spatie.be/docs/laravel-prometheus/v1/setting-up-prometheus-and-grafana/using-fly-metrics)

Advanced usage
--------------

- [ Creating multiple endpoints ](https://spatie.be/docs/laravel-prometheus/v1/advance-usage/using-multiple-endpoints)
- [ Creating collectors ](https://spatie.be/docs/laravel-prometheus/v1/advance-usage/creating-collectors)
- [ Using counter type metric ](https://spatie.be/docs/laravel-prometheus/v1/advance-usage/using-counter-metric)

 Using Horizon exporters
=======================

We can export key metrics from Horizon to Prometheus. To enable this feature, uncomment this line in the `app/Providers/PrometheusServiceProvider.php` file.

```
$this->registerHorizonCollectors();
```

This will register the following collectors:

- `horizon_master_supervisors`: exports the number of master supervisors.
- `horizon_current_processes`: exports the number of processes currently running per queue
- `horizon_current_workload`: exports the number of jobs currently waiting per queue.
- `horizon_failed_recent_jobs`: exports the number of recently failed jobs
- `horizon_status`: exports if the Horizon is running, paused, or inactive
- `horizon_jobs_per_minute`: exports the number of jobs processed in the last minute
- `horizon_recent_jobs`: exports the number of recent jobs

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
