Prometheus client for laravel framework. Includes some of default metrics for any laravel application out of the box and ability to add custom metrics easily. .
vmorozov/laravel-prometheus is a Laravel package for prometheus client for laravel framework. includes some of default metrics for any laravel application out of the box and ability to add custom metrics easily. ..
It currently has 0 GitHub stars and 826 downloads on Packagist (latest version v1.3.2).
Install it with composer require vmorozov/laravel-prometheus.
Discover more Laravel packages by vmorozov
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package for integrating Prometheus metrics collection into your Laravel application.
This package makes it easy to collect and expose metrics for monitoring your application's performance and behavior.
composer require vmorozov/laravel-prometheus
php artisan vendor:publish --provider="VMorozov\\Prometheus\\PrometheusServiceProvider"
composer.jsoncomposer update
php artisan vendor:publish --provider="VMorozov\\Prometheus\\PrometheusServiceProvider" --force
php artisan prometheus:clear_stored_metrics
This package provides default metrics that allow you to monitor response times (divided into buckets and percentiles) and request counts.
It also allows you to create custom metrics and collectors for your specific needs.
To see the collected metrics, go to the /metrics endpoint of your application.
This endpoint returns metrics in the Prometheus exposition format, which can be scraped by a Prometheus server.
You can clear stored metrics using the built-in prometheus:clear_stored_metrics command:
php artisan prometheus:clear_stored_metrics
The package can be configured using the laravel-prometheus.php configuration file.
This file is published to your application's config directory when you run the vendor:publish command.
Key configuration options include:
/metrics)For detailed configuration information, see the Configuration Documentation.
The package includes two default metrics:
For more information about the default metrics, see the Default Metrics Documentation.
You can create custom metrics to monitor specific aspects of your application. The package supports three types of metrics:
For information on creating and using custom metrics, see the Custom Metrics Documentation.
On-Demand Metrics Collectors are classes that collect metrics only when the metrics endpoint is accessed.
This is useful for metrics that are expensive to collect or that don't need to be updated on every request.
For information on creating and using custom On-Demand Metrics Collectors, see the On-Demand Metrics Collectors Documentation.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.