rianfuro / laravel-prometheus-storage-adapter
Laravel Eloquent storage adapter for the prometheus php client
Installs: 119
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/rianfuro/laravel-prometheus-storage-adapter
Requires
- ext-json: *
- laravel/framework: >=6.0
- promphp/prometheus_client_php: ^2.3
Requires (Dev)
README
This packag provides an Adapter implementation for endclothing/prometheus_client_php,
using Laravel's Eloquent to store metrics in your database. Is it a good idea? Probably not, but here it is anyway - maybe it'll fit your needs.
Installation
composer require rianfuro/laravel-prometheus-storage-adapter
php artisan migrate
There's no configuration attached to this library, the adapter will simply use your default connection from your database.php.
Usage
You can then simply register the adapter in your ServiceProvider, for example as follows:
$this->app->bind(Adapter::class, LaravelPrometheusStorageAdapter\EloquentStorageAdapter::class);
$this->app->singleton(CollectorRegistry::class);