Download the PHP package vntrungld/prometheus-exporter without Composer
On this page you can find all versions of the php package vntrungld/prometheus-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vntrungld/prometheus-exporter
More information about vntrungld/prometheus-exporter
Files in vntrungld/prometheus-exporter
Package prometheus-exporter
Short Description Prometheus Exporter for Laravel
License MIT
Homepage https://github.com/vntrungld/prometheus-exporter
Informations about the package prometheus-exporter
Laravel Prometheus Exporter
A simple and extensible Prometheus metrics exporter for Laravel applications.
Requirements
- PHP 7.4, 8.0, 8.1, 8.2, 8.3, or 8.4
- Laravel 6.x, 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, or 13.x
Installation
Install via Composer:
Publish the configuration file:
Configuration
The configuration file will be published to config/prometheus-exporter.php:
Usage
Accessing Metrics
Once installed, metrics are available at the configured endpoint:
If you've configured a security token:
Creating Custom Collectors
Create a collector by implementing the Collector interface:
Register your collector in the configuration:
Metric Types
Counter
A counter is a cumulative metric that only increases:
Gauge
A gauge represents a value that can go up or down:
Histogram
A histogram samples observations and counts them in configurable buckets:
Summary
A summary samples observations and provides quantiles:
Collector Sets
Group related collectors using the CollectorSet interface:
Register the set in configuration:
Multi-Tier Configuration
For Kubernetes deployments with multiple application tiers:
Set the tier via environment variable:
Using the Facade
You can also use the Prometheus facade directly:
Security
Token Authentication
Set a security token to protect your metrics endpoint:
Access metrics with the token:
Custom Middleware
Add your own middleware for additional security:
First Party Collectors
- Horizon Collector - Laravel Horizon metrics
- PHP-FPM Collector - PHP-FPM pool metrics
Testing
Run the test suite:
Or directly with PHPUnit:
Changelog
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Lam Duc Trung
- All Contributors
License
MIT License. Please see the license file for more information.
All versions of prometheus-exporter with dependencies
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
promphp/prometheus_client_php Version ^2.11