PHPackages                             3slab/vdm-prometheus-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. 3slab/vdm-prometheus-bundle

ActiveSymfony-bundle

3slab/vdm-prometheus-bundle
===========================

Provide a metric endpoint to be pulled by Prometheus

1.2.0(2y ago)29441[2 PRs](https://github.com/3slab/VdmPrometheusBundle/pulls)proprietaryPHPPHP &gt;=7.2

Since Dec 14Pushed 2y ago3 watchersCompare

[ Source](https://github.com/3slab/VdmPrometheusBundle)[ Packagist](https://packagist.org/packages/3slab/vdm-prometheus-bundle)[ RSS](/packages/3slab-vdm-prometheus-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

VdmPrometheusBundle
===================

[](#vdmprometheusbundle)

[![Build Status](https://camo.githubusercontent.com/480af68adfcb3d4ecf25013d04920a00624230fb50dcf60e8b2f133326abc762/68747470733a2f2f7472617669732d63692e636f6d2f33736c61622f56646d50726f6d65746865757342756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/3slab/VdmPrometheusBundle)

This bundle provides a metric endpoint to be pulled by Prometheus. It uses the [prometheus client from PromPHP](https://github.com/PromPHP/prometheus_client_php/)

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 :

```
# HELP php_info Information about the PHP environment.
# TYPE php_info gauge
php_info{version="7.3.11-0ubuntu0.19.10.6"} 1
# HELP vdm_sf_app_call_total Number of call to the app
# TYPE vdm_sf_app_call_total counter
vdm_sf_app_call_total{app="app",route=""} 1
vdm_sf_app_call_total{app="app",route="error_route"} 1
vdm_sf_app_call_total{app="app",route="success_route"} 2
# HELP vdm_sf_app_memory_usage Memory in byte per route
# TYPE vdm_sf_app_memory_usage gauge
vdm_sf_app_memory_usage{app="app",route=""} 25165824
vdm_sf_app_memory_usage{app="app",route="error_route"} 25165824
vdm_sf_app_memory_usage{app="app",route="success_route"} 25165824
# HELP vdm_sf_app_response_code_total Number of call to the API per response code
# TYPE vdm_sf_app_response_code_total counter
vdm_sf_app_response_code_total{app="app",route="",http_code="404"} 1
vdm_sf_app_response_code_total{app="app",route="error_route",http_code="500"} 1
vdm_sf_app_response_code_total{app="app",route="success_route",http_code="200"} 2
# HELP vdm_sf_app_response_size Response size in bytes
# TYPE vdm_sf_app_response_size gauge
vdm_sf_app_response_size{app="app",route=""} 305784
vdm_sf_app_response_size{app="app",route="error_route"} 5
vdm_sf_app_response_size{app="app",route="success_route"} 7
# HELP vdm_sf_app_response_time Request execution time in seconds
# TYPE vdm_sf_app_response_time gauge
vdm_sf_app_response_time{app="app",route=""} 81.976890563965
vdm_sf_app_response_time{app="app",route="error_route"} 0.10800361633301
vdm_sf_app_response_time{app="app",route="success_route"} 0.09608268737793

```

Installation
------------

[](#installation)

```
composer require 3slab/vdm-prometheus-bundle
```

And load the routes in `routing.yml` :

```
vdm_prometheus:
  resource: "@VdmPrometheusBundle/Resources/config/routing.yml"
  prefix:   /
```

Configuration
-------------

[](#configuration)

Put your configuration in `config/packages/vdm_prometheus.yaml` file. This is the default :

```
vdm_prometheus:
  app: app
  namespace: vdm
  register_default_metrics: true
  secret: ~
  metrics_path: /metrics
  storage:
    type: default
```

ParameterDefaultDescription`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 theheader `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 belowConfigure the storage to store metrics between requestsMetrics storage
---------------

[](#metrics-storage)

To persist metrics between requests, you have to store them in persistent storage.

The following storage are supported :

- **In Memory** *(the default)*

```
vdm_prometheus:
  storage:
    type: memory

```

- **APCu**

```
vdm_prometheus:
  storage:
    type: apcu

```

You need to have the php module `ext-apc` installed.

- **Redis**

```
vdm_prometheus:
  storage:
    type: redis
    settings:
      host: '127.0.0.1'
      port: 6379
      timeout: 0.1
      read_timeout: 10
      persistent_connections: false
      password: ~

```

You need to have the php module `ext-redis` installed.

- **Custom**

```
vdm_prometheus:
  storage:
    type: custom
    service: my_service_id

```

With custom storage, you need to provide a Symfony service which implements the [PromPHP Storage Adapter Interface](https://github.com/PromPHP/prometheus_client_php/blob/master/src/Prometheus/Storage/Adapter.php)

Custom collectors
-----------------

[](#custom-collectors)

You can [create your own collector](./Resources/doc/create_your_own_collector.md) if you want to track other information.

Grafana
-------

[](#grafana)

This bundle provides a [grafana dashboard](./Resources/grafana) setup to work with default configuration for settings `vdm_prometheus.app` and `vdm_prometheus.namespace`.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~400 days

Total

4

Last Release

770d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c22c6eb06bd9de96a2a9391672ce4fee607a63c08c635b539dba8667be570f7?d=identicon)[3slab](/maintainers/3slab)

---

Top Contributors

[![jbouzekri](https://avatars.githubusercontent.com/u/880996?v=4)](https://github.com/jbouzekri "jbouzekri (10 commits)")[![angelfs](https://avatars.githubusercontent.com/u/7326299?v=4)](https://github.com/angelfs "angelfs (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/3slab-vdm-prometheus-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/3slab-vdm-prometheus-bundle/health.svg)](https://phpackages.com/packages/3slab-vdm-prometheus-bundle)
```

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2692.9M24](/packages/stfalcon-tinymce-bundle)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[rikudou/psr6-dynamo-db-bundle

PSR-6 and PSR-16 cache implementation using AWS DynamoDB for Symfony

2077.8k](/packages/rikudou-psr6-dynamo-db-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
