Migrate to the Prometheus client 1.x based Micrometer registry

Apache 2.0

Quarkus 4.0 switches from micrometer-registry-prometheus-simpleclient to micrometer-registry-prometheus, whose classes live in the io.micrometer.prometheusmetrics package and use PrometheusRegistry instead of CollectorRegistry.

io.quarkus.updates.core.quarkus40.MicrometerPrometheusMetrics
mod run . --recipe=io.quarkus.updates.core.quarkus40.MicrometerPrometheusMetrics

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Rename package name io.micrometer.prometheus to io.micrometer.prometheusmetrics
  2. Delete method argument 0 in methods io.prometheus.client.CollectorRegistry <constructor>(boolean)
  3. Change type CollectorRegistry to PrometheusRegistry