Skip to content

config: Add support of artprima/prometheus-metrics-bundle v1.21#1948

Open
Johnmeurt wants to merge 1 commit intosymfony:mainfrom
Johnmeurt:main
Open

config: Add support of artprima/prometheus-metrics-bundle v1.21#1948
Johnmeurt wants to merge 1 commit intosymfony:mainfrom
Johnmeurt:main

Conversation

@Johnmeurt
Copy link
Contributor

Q A
License MIT
Packagist https://packagist.org/packages/artprima/prometheus-metrics-bundle

Update Recipe: artprima/prometheus-metrics-bundle to add support of v1.21

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) February 13, 2026 14:24
@github-actions
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1948/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1948/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'artprima/prometheus-metrics-bundle:^1.21'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

artprima/prometheus-metrics-bundle

1.0 vs 1.14
diff --git a/artprima/prometheus-metrics-bundle/1.0/config/packages/prometheus_metrics.yaml b/artprima/prometheus-metrics-bundle/1.14/config/packages/prometheus_metrics.yaml
index e3e12106..7347ea7c 100644
--- a/artprima/prometheus-metrics-bundle/1.0/config/packages/prometheus_metrics.yaml
+++ b/artprima/prometheus-metrics-bundle/1.14/config/packages/prometheus_metrics.yaml
@@ -1,6 +1,21 @@
 artprima_prometheus_metrics:
     namespace: myapp
-    type: apcu
+    storage: '%env(PROM_METRICS_DSN)%'
+
     ignored_routes:
-    - prometheus_bundle_prometheus
-    - _wdt
+        - prometheus_bundle_prometheus
+        - _wdt
+
+    # used to disable default application metrics
+    #disable_default_metrics: false
+
+    # Recommended to disable default metrics from promphp/prometheus_client_php
+    # see https://github.com/PromPHP/prometheus_client_php/issues/62
+    disable_default_promphp_metrics: true
+
+    # used to enable console metrics
+    #enable_console_metrics: false
+
+when@test:
+    artprima_prometheus_metrics:
+        storage: in_memory
diff --git a/artprima/prometheus-metrics-bundle/1.0/config/packages/test/prometheus_metrics.yaml b/artprima/prometheus-metrics-bundle/1.0/config/packages/test/prometheus_metrics.yaml
deleted file mode 100644
index 80ad98d1..00000000
--- a/artprima/prometheus-metrics-bundle/1.0/config/packages/test/prometheus_metrics.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-artprima_prometheus_metrics:
-    type: in_memory
diff --git a/artprima/prometheus-metrics-bundle/1.0/manifest.json b/artprima/prometheus-metrics-bundle/1.14/manifest.json
index d10a6b70..a4ddefdc 100644
--- a/artprima/prometheus-metrics-bundle/1.0/manifest.json
+++ b/artprima/prometheus-metrics-bundle/1.14/manifest.json
@@ -4,5 +4,8 @@
     },
     "copy-from-recipe": {
         "config/": "%CONFIG_DIR%/"
+    },
+    "env": {
+        "PROM_METRICS_DSN": "apcu"
     }
 }
1.14 vs 1.21
diff --git a/artprima/prometheus-metrics-bundle/1.14/config/routes/metrics.yaml b/artprima/prometheus-metrics-bundle/1.21/config/routes/metrics.yaml
index fa30eee0..24283f2d 100644
--- a/artprima/prometheus-metrics-bundle/1.14/config/routes/metrics.yaml
+++ b/artprima/prometheus-metrics-bundle/1.21/config/routes/metrics.yaml
@@ -1,2 +1,2 @@
 app_metrics:
-    resource: '@ArtprimaPrometheusMetricsBundle/Resources/config/routing.xml'
+    resource: '@ArtprimaPrometheusMetricsBundle/Resources/config/routing.yaml'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant