Get expert guidance in a few days with a Laravel code review

Laravel Prometheus

spatie/laravel-prometheus image

Laravel Prometheus stats

Downloads
28.1K
Stars
83
Open Issues
1
Forks
10

View on GitHub →

Export Laravel metrics to Prometheus

Export Laravel metrics to Prometheus

This package can export key metrics of your app to Prometheus. It does this by providing an easy way to register metrics. Here's an example where we are going to export the user count to Prometheus.

Prometheus::addGauge('User count')
->value(fn() => User::count();

These metrics will be exposed at the /prometheus endpoint. The package offers a way to add a security layer, so your key metrics don't become public.

You can configure your Prometheus instance to periodically crawl and import the metrics at the /prometheus endpoint of your app. Using Grafana, you can visualize the data points that are stored in Prometheus.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Documentation

You can find full documentation on our dedicated documentation site.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

The Horizon collectors were heavily inspired on Lukas Kämmerling' excellent laravel-horizon-prometheus-exporter package.

License

The MIT License (MIT). Please see License File for more information.

spatie photo

We create open source, digital products and courses for the developer community

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Spatie Laravel Prometheus Related Articles

Laravel Mobile Pass: Generate Apple Wallet and Google Wallet Passes image

Laravel Mobile Pass: Generate Apple Wallet and Google Wallet Passes

Read article
Spatie Shares Their Coding Guidelines as AI Skills image

Spatie Shares Their Coding Guidelines as AI Skills

Read article
Log User Activity in Your Laravel App with Activity Log v5  image

Log User Activity in Your Laravel App with Activity Log v5

Read article
Lens for Laravel Brings WCAG Auditing to Your Local Dev Workflow image

Lens for Laravel Brings WCAG Auditing to Your Local Dev Workflow

Read article
Nimbus: An In-Browser API Testing Playground for Laravel image

Nimbus: An In-Browser API Testing Playground for Laravel

Read article
Memoization and Function Caching with this PHP Package image

Memoization and Function Caching with this PHP Package

Read article
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
CodeKudu logo

CodeKudu

Stand-ups, Retrospectives, and 360° Feedback for the entire team. 50% off with code LARAVELNEWS.

CodeKudu
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing