Skip to content

Commit 7fee08e

Browse files
committed
Micrometer prometheus client v1.0 breaking changes
1 parent a095711 commit 7fee08e

File tree

1 file changed

+38
-30
lines changed

1 file changed

+38
-30
lines changed

_posts/2025-06-18-micrometer-prometheus-v1.adoc

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,37 @@ layout: post
33
title: 'Quarkus Micrometer using Prometheus client v1'
44
date: 2025-06-12
55
tags: micrometer prometheus
6-
synopsis: Micrometer has moved to use the Prometheus client v1. This post explains the migration paths and required changes for applications.
6+
synopsis: Micrometer has moved to use the Prometheus client v1. This post explains the migration path and required changes for applications.
77
author: brunobat
88
---
99

1010
== Quarkus Micrometer using Prometheus client v1
1111

12-
Micrometer has moved to using the Prometheus Client v1.x.
12+
Micrometer adopted Prometheus Client v1.x starting with version 1.13. However, Quarkus still uses Prometheus Client v0.x by default through the `quarkus-micrometer-registry-prometheus` extension which has been using the legacy `io.prometheus:simpleclient`.
1313

14-
This change has happened on Micrometer v1.13 but since then, in quarkus we have been using the legacy `io.prometheus:simpleclient`
15-
to not interfere with the release of the previous LTS and to provide a clear migration path to all Quarkus applications.
14+
This existing extension will remain available throughout the Quarkus 3.x series but is now declared *deprecated*. In parallel, we’ll be introducing a new extension: `quarkus-micrometer-registry-prometheus-v1`, which integrates the new client.
1615

17-
The time to upgrade comes with the upcoming Quarkus 3.25.0, and you might not need to take action, but if your application is affected there will be two choices:
16+
[INFO]
17+
====
18+
Users should move to the new `quarkus-micrometer-registry-prometheus-v1` extension.
19+
====
1820

19-
1. Upgrade Quarkus, deal with the breaking changes and use the new client version. This is the recommended path.
20-
2. Continue using the legacy and deprecated Prometheus client v0.x by using a newly created extension on Quarkiverse.
21+
Since the new client introduces *breaking changes*, we’ve prepared a migration plan designed to reduce the impact on existing users.
2122

22-
=== Upgrade Quarkus and use Prometheus Client v1.x
23+
=== Migration plan
2324

24-
The `quarkus-micrometer-registry-prometheus` extension is now using the Prometheus Client v1.x including breaking changes expressed in detail on the https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide[Micrometer 1.13 Migration Guide], featuring package, API and semantic convention changes.
25+
1. Keep current extension as is until Quarkus 4.0 (whenever that happens) so users can migrate at a time of their choice.
26+
2. Introduce a new extension called `quarkus-micrometer-registry-prometheus-v1`.
27+
3. Remove current `quarkus-micrometer-registry-prometheus` on Quarkus 4.0 (no timeline at this moment) while providing an alternative on Quarkiverse. Quarkus users will get an additional migration period by using an upcoming community supported Quarkiverse extension.
28+
4. Refactor code on Quarkus 4.0: Stramline https://quarkus.io/guides/telemetry-micrometer[`quarkus-micrometer`], the main extension and `quarkus-micrometer-registry-prometheus-v1` to remove legacy code from Quarkus 4.0. At some point after this, we might rename `quarkus-micrometer-registry-prometheus-v1` to `quarkus-micrometer-registry-prometheus` and provide automatic redirects for the artifacts. Users of the new client will not be impacted.
2529

26-
These are the main points to consider in the new Quarkus 3.25.0:
30+
31+
32+
=== Prometheus Client v1.x changes
33+
34+
The `quarkus-micrometer-registry-prometheus-v1` extension will be using the Prometheus Client v1.x and includes *breaking changes* expressed in detail on the https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide[Micrometer 1.13 Migration Guide], featuring package, API and semantic convention changes.
35+
36+
These are the main points to consider when migrating to the new Quarkus extension:
2737

2838
* Counters now use Longs instead of Doubles.
2939
** Before: `"registry=\"prometheus\",status=\"200\",uri=\"/example/prime/{number}\"} 2.0`
@@ -40,34 +50,32 @@ Other changes:
4050

4151
* Metrics must be registered always with the same tags. Micrometer will now send a warning if we register the same metric more than once with different Tag names.
4252

43-
Quarkus automatic instrumentation is now producing metrics according to these changes. If your application generates their custom metrics, please update metrics creation, tests and dashboard queries according to the above guidelines.
53+
Quarkus automatic instrumentation will generate metrics reflecting these changes. If your application defines custom metrics, be sure to update their creation, associated tests, and any dashboard queries to align with the guidelines above.
4454

45-
=== Continue using the legacy and deprecated Prometheus client v0.x
55+
=== About metrics in Quarkus
4656

47-
This is a short term solution because the old v0.x client is deprecated and will be removed at some point.
57+
The https://quarkus.io/guides/telemetry-micrometer[Micrometer extension] is the recommended approach to generate metrics in Quarkus and this a rare occasions were breaking changes are being introduced.
4858

49-
In this case, the core extension must be *removed*:
59+
Micrometer has become the default metrics framework in Quarkus due to its stability, maturity, and widespread adoption — not https://quarkus.io/guides/opentelemetry-metrics[OpenTelemetry Metrics].
5060

51-
```xml
52-
<dependency>
53-
<groupId>io.quarkus</groupId>
54-
<artifactId>quarkus-micrometer-registry-prometheu</artifactId>
55-
</dependency>
56-
```
61+
Micrometer support in Quarkus is built on top af a main extension `quarkus-micrometer`, then specific registries extensions include it as a dependency and implement a registry sending out the telemetry. The Prometheus registry (`quarkus-micrometer-registry-prometheus`) is the default and most commonly used, and it is the focus of this announcement.
5762

58-
And the legacy Quarkiverse extension must be *added*:
63+
However, there are alternative ways to export metrics using Micrometer:
5964

60-
```xml
61-
<dependency>
62-
<groupId>${project.groupId}</groupId>
63-
<artifactId>quarkus-micrometer-registry-prometheus-simpleclient</artifactId>
64-
</dependency>
65-
```
65+
* Through the https://github.com/quarkiverse/quarkus-micrometer-registry/[Quarkiverse Micrometer registries]
66+
* Via OpenTelemetry, using a bridge provided by the https://quarkus.io/guides/telemetry-micrometer-to-opentelemetry[Micrometer and OpenTelemetry] extension. This setup allows Micrometer metrics to be sent as OpenTelemetry metrics, offering a unified output via the https://opentelemetry.io/docs/specs/otlp/[OpenTelemetry OTLP protocol].
6667

67-
from this repository: https://github.com/quarkiverse/quarkus-micrometer-registry/tree/main/micrometer-registry-prometheus-simpleclient[micrometer-registry-prometheus-simpleclient] after version 3.4.0.
68+
For more details on Observability in Quarkus please visit https://quarkus.io/guides/observability[this guide].
6869

6970
=== Conclusion
7071

71-
The Micrometer extension is the recommended way to generate metrics in Quarkus and this a rare moment were breaking changes were introduced. Now is the moment to evaluate if you application requires Micrometer related changes, in face of Quarkus 3.25.0.
72+
While the existing Prometheus registry remains available for the Quarkus 3.x lifecycle, it is now deprecated, and users are encouraged to begin migrating to the new extension because the old client extension will be removed on Quarkus 4.0 (no timeline at this moment).
73+
74+
This change introduces a number of breaking updates aligned with Micrometer 1.13 and Prometheus Client v1.x, affecting metric types, naming conventions, and APIs.
75+
76+
To support users, a migration plan has been outlined to provide flexibility and minimize disruption.
77+
78+
The prometheus client is not the only option to send out telemetry, there are alternative options such as the Quarkiverse registries or our OpenTelemetry bridge.
79+
80+
You can follow Quarkus release dates here: https://github.com/quarkusio/quarkus/wiki/Release-Planning
7281

73-
For more details on Observability in Quarkus please visit https://quarkus.io/guides/observability[this guide].

0 commit comments

Comments
 (0)