PHP code example of triadev / laravel-prometheus-exporter

1. Go to this page and download the library: Download triadev/laravel-prometheus-exporter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

triadev / laravel-prometheus-exporter example snippets


php artisan vendor:publish --provider="Triadev\PrometheusExporter\Provider\PrometheusExporterServiceProvider" --tag="config"

$router->get('/test/route', function () {
    return 'valid';
})->middleware('lpe.requestPerRoute');
config/prometheus-exporter.php

'buckets_per_route' => [
    ROUTE-NAME => [10,20,50,100,200],
    ...
]