Download the PHP package 3slab/vdm-prometheus-bundle without Composer
On this page you can find all versions of the php package 3slab/vdm-prometheus-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download 3slab/vdm-prometheus-bundle
More information about 3slab/vdm-prometheus-bundle
Files in 3slab/vdm-prometheus-bundle
Package vdm-prometheus-bundle
Short Description Provide a metric endpoint to be pulled by Prometheus
License proprietary
Informations about the package vdm-prometheus-bundle
VdmPrometheusBundle
This bundle provides a metric endpoint to be pulled by Prometheus. It uses the prometheus client from PromPHP
It collects the following metrics :
- Memory in byte per route
- Number of call to the API per response code
- Response size in bytes
- Request execution time in seconds
Response example :
Installation
And load the routes in routing.yml
:
Configuration
Put your configuration in config/packages/vdm_prometheus.yaml
file. This is the default :
Parameter | Default | Description |
---|---|---|
vdm_prometheus.app |
app |
set the value of the app tag on all metrics |
vdm_prometheus.namespace |
vdm |
prefix all the metrics' label |
vdm_prometheus.register_default_metrics |
true |
app PromPHP Prometheus Client default metric |
vdm_prometheus.secret |
null |
if set, you need to provide the secret as a GET parameter secret or in the |
header VDM-Prometheus-Secret
to get the detailed result of the metrics in the response body.
vdm_prometheus.metrics_path
| /metrics
| Change the path of the metric endpoint.
vdm_prometheus.storage
| see below | Configure the storage to store metrics between requests
Metrics storage
To persist metrics between requests, you have to store them in persistent storage.
The following storage are supported :
-
In Memory (the default)
- APCu
You need to have the php module ext-apc
installed.
- Redis
You need to have the php module ext-redis
installed.
- Custom
With custom storage, you need to provide a Symfony service which implements the PromPHP Storage Adapter Interface
Custom collectors
You can create your own collector if you want to track other information.
Grafana
This bundle provides a grafana dashboard setup to work with default configuration for settings vdm_prometheus.app
and vdm_prometheus.namespace
.
All versions of vdm-prometheus-bundle with dependencies
symfony/framework-bundle Version ^5.4|^6.4
promphp/prometheus_client_php Version ^2