A prometheus exporter for Laravel Forked from https://github.com/Superbalist/laravel-prometheus-exporter and updated for laravel 9
Find a file
2017-07-27 11:14:32 +02:00
config initial commit 2017-07-27 11:11:02 +02:00
src initial commit 2017-07-27 11:11:02 +02:00
.gitignore initial commit 2017-07-27 11:11:02 +02:00
.styleci.yml initial commit 2017-07-27 11:11:02 +02:00
.travis.yml initial commit 2017-07-27 11:11:02 +02:00
changelog.md initial commit 2017-07-27 11:11:02 +02:00
composer.json initial commit 2017-07-27 11:11:02 +02:00
LICENSE initial commit 2017-07-27 11:11:02 +02:00
phpunit.php initial commit 2017-07-27 11:11:02 +02:00
phpunit.xml initial commit 2017-07-27 11:11:02 +02:00
README.md fix copy/paste error 2017-07-27 11:14:32 +02:00

laravel-prometheus-exporter

A prometheus exporter for Laravel.

Author Build Status Software License Packagist Version Total Downloads

This package is a wrapper bridging jimdo/prometheus_client_php into Laravel.

Installation

composer require superbalist/laravel-prometheus-exporter

Register the service provider in app.php

'providers' => [
    // ...
    Superbalist\LaravelPrometheusExporter\PrometheusServiceProvider::class,
]

Register the facade in app.php

'aliases' => [
    // ...
    'Prometheus' => Superbalist\LaravelPrometheusExporter\PrometheusFacade::class,
]

Configuration

The package has a default configuration which uses the following environment variables.

PROMETHEUS_NAMESPACE=app

PROMETHEUS_METRICS_ROUTE_ENABLED=true
PROMETHEUS_METRICS_ROUTE_PATH=metrics
PROMETHEUS_METRICS_ROUTE_MIDDLEWARE=null

PROMETHEUS_STORAGE_ADAPTER=memory

REDIS_HOST=localhost
REDIS_PORT=6379
PROMETHEUS_REDIS_PREFIX=PROMETHEUS_

To customize the configuration file, publish the package configuration using Artisan.

php artisan vendor:publish --provider="Superbalist\LaravelPrometheusExporter\PrometheusServiceProvider"

You can then edit the generated config at app/config/prometheus.php.

// TODO:

Usage

// TODO: