Download the PHP package stepovenko/laravel-prometheus without Composer
On this page you can find all versions of the php package stepovenko/laravel-prometheus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stepovenko/laravel-prometheus
More information about stepovenko/laravel-prometheus
Files in stepovenko/laravel-prometheus
Package laravel-prometheus
Short Description Prometheus bridge for Laravel with Ensi-compatible facade and config
License MIT
Homepage https://github.com/stepovenko/laravel-prometheus
Informations about the package laravel-prometheus
Laravel Prometheus
Drop-in Prometheus bridge for Laravel on top of promphp/prometheus_client_php.
The package keeps the original Ensi\LaravelPrometheus\... namespace and the Prometheus facade alias, so existing application code can usually switch dependencies without mass refactoring.
Installation
Install the package via Composer:
The package declares replace for ensi/laravel-prometheus, so applications can migrate by swapping the package name in composer.json.
Publish the config if you want to customize bags, routes, or storage:
Version Compatibility
| Package | Laravel | PHP |
|---|---|---|
| ^2.0.0 | ^12.0 || ^13.0 | ^8.2 |
Notes:
- Laravel 12 installs on PHP 8.2+.
- Laravel 13 itself requires PHP 8.3+, so Composer will only resolve it on PHP 8.3+.
Basic Usage
The package registers the Prometheus facade alias automatically. If you prefer explicit imports, use Ensi\LaravelPrometheus\Prometheus.
Register your metrics during bootstrap:
Update metric values from your application code:
Configuration
Example config/prometheus.php structure:
Bags
A bag is an isolated set of metrics with its own namespace, storage, middleware stack, and scrape route. This is useful when you want to separate technical metrics from business metrics.
Supported Storages
memoryapcuapcu-ngredisconnectionnull-storage
ext-redis is optional at install time and required only for redis and connection storage modes.
Advanced Usage
Select another bag for metric registration and updates:
Label Middlewares
Label middlewares add labels globally for a bag or locally for a metric builder chain.
Then register the middleware class in bag config:
On-Demand Metrics
On-demand metrics are refreshed right before scrape and are useful for gauges such as queue size or current memory usage.
Development
Security
Please review our security policy for reporting vulnerabilities.
License
The MIT License (MIT). See LICENSE.md for details.
All versions of laravel-prometheus with dependencies
laravel/framework Version ^12.0 || ^13.0
promphp/prometheus_client_php Version ^2.6