Skip to content

Conversation

@brunobat
Copy link
Contributor

@brunobat brunobat commented May 21, 2025

Includes:

  • Upgrade to Micrometer 1.15.0
  • Split IT test between with OTel and without OTel to make sure native works on both cases.
  • Make sure we register http.server.requests always with the same tags. Micrometer will now send a warning if we register the same metric more than once with different Tag names.
  • We will stop using the simple client and all changes based on: https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide. Namely:
    • Counters now use Longs instead of Doubles.
      Before: "registry=\"prometheus\",status=\"200\",uri=\"/example/prime/{number}\"} 2.0
      Now: "registry=\"prometheus\",status=\"200\",uri=\"/example/prime/{number}\"} 2
    • io.micrometer.prometheusmetrics.PrometheusMeterRegistry must be used instead of the old io.micrometer.prometheus.PrometheusMeterRegistry
    • io.prometheus.metrics.tracer.common.SpanContext must be used instead of the old io.prometheus.client.exemplars.ExemplarSampler
    • The new Prometheus client uses some reserved words that must not be used to name metrics, therefore some metrics were renamed. Some examples of reserved words and renamed metrics:
      • info. Before: jvm_info_total. Now: jvm_total
      • duration. Before: http_server_requests_duration_seconds. Now: http_server_requests_seconds
    • Some metrics would display Tags ending in a comma (,). This tailing comma has now been removed. Example: "hibernate_flushes_total{entityManagerFactory=\"<default>\",env=\"test\",env2=\"test\",registry=\"prometheus\",} 1.0"
    • It is no longer possible to create a metric generating Service Level Objectives and Percentiles at the same time.

IMPORTANT: This PR has a companion PR on quarkiverse's quarkus-micrometer-registry here: quarkiverse/quarkus-micrometer-registry#504

@quarkus-bot
Copy link

quarkus-bot bot commented May 21, 2025

/cc @ebullient (micrometer)

@quarkus-bot

This comment was marked as resolved.

@github-actions
Copy link

github-actions bot commented May 21, 2025

🙈 The PR is closed and the preview is expired.

@karesti
Copy link
Member

karesti commented May 22, 2025

@brunobat need any help here ?

@brunobat
Copy link
Contributor Author

I will know soon

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from d6459fd to 6d2dcec Compare June 2, 2025 14:50
@quarkus-bot quarkus-bot bot added the area/dependencies Pull requests that update a dependency file label Jun 2, 2025
@brunobat
Copy link
Contributor Author

brunobat commented Jun 2, 2025

Apart from docs, this should be ready.
@karesti can you please checkout the PR and see if it does what you need?

@brunobat brunobat marked this pull request as ready for review June 2, 2025 15:07
@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 6d2dcec to f4d0d59 Compare June 2, 2025 15:11
@quarkus-bot

This comment has been minimized.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from f4d0d59 to 336b202 Compare June 2, 2025 15:22
@quarkus-bot

This comment has been minimized.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 336b202 to 4cf616d Compare June 2, 2025 17:00
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 4cf616d to 60493ec Compare June 2, 2025 20:23
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@brunobat brunobat marked this pull request as draft June 3, 2025 07:57
@brunobat
Copy link
Contributor Author

brunobat commented Jun 3, 2025

Native mode needs fixing.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 60493ec to 7da4052 Compare June 3, 2025 09:58
@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Jun 3, 2025
@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 7da4052 to 94ee1cc Compare June 3, 2025 10:37
@brunobat brunobat marked this pull request as ready for review June 4, 2025 08:20
@quarkus-bot

This comment has been minimized.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch 2 times, most recently from c696648 to 9d0f9ca Compare June 9, 2025 11:30
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@brunobat brunobat force-pushed the micrometer-prometheus-client-v1 branch from 9d0f9ca to f47516b Compare June 9, 2025 17:56
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 9, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit f47516b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

@quarkus-bot
Copy link

quarkus-bot bot commented Jun 9, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit f47516b.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/smallrye-reactive-messaging/deployment

io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector - History

  • Expecting actual: ["-6","-7","-9","-10","-11","-12","-13","-14"] to start with: ["-6", "-7", "-8", "-9"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-6","-7","-9","-10","-11","-12","-13","-14"]
to start with:
  ["-6", "-7", "-8", "-9"]

	at io.quarkus.smallrye.reactivemessaging.hotreload.ConnectorChangeTest.testUpdatingConnector(ConnectorChangeTest.java:41)

📦 extensions/websockets-next/deployment

io.quarkus.websockets.next.test.broadcast.BroadcastOnOpenTest.testLo - History

  • Messages: [c2:client1] ==> expected: <true> but was: <false> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: Messages: [c2:client1] ==> expected: <true> but was: <false>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63)
	at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36)
	at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214)
	at io.quarkus.websockets.next.test.broadcast.BroadcastOnOpenTest.assertBroadcast(BroadcastOnOpenTest.java:105)
	at io.quarkus.websockets.next.test.broadcast.BroadcastOnOpenTest.testLo(BroadcastOnOpenTest.java:45)

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_UniFailed - History

  • Stream has no elements - java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:236)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_UniFailed(MicrometerTimedInterceptorTest.java:202)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)
	at io.quarkus.test.QuarkusUnitTest.interceptTestMethod(QuarkusUnitTest.java:435)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

⚙️ Gradle Tests - JDK 17 Windows

📦 integration-tests/gradle

io.quarkus.gradle.devmode.IncludedKotlinBuildDevModeTest.main - History

  • Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes 30 seconds. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.test.devmode.util.DevModeClient was not fulfilled within 1 minutes  30 seconds.
	at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at app//org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at app//io.quarkus.test.devmode.util.DevModeClient.getHttpResponse(DevModeClient.java:164)
	at app//io.quarkus.gradle.devmode.QuarkusDevGradleTestBase.getHttpResponse(QuarkusDevGradleTestBase.java:165)

⚙️ JVM Integration Tests - JDK 17

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

⚙️ JVM Integration Tests - JDK 21

📦 integration-tests/opentelemetry

io.quarkus.it.opentelemetry.LoggingResourceTest.testException - History

  • Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes. - org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.LoggingResourceTest was not fulfilled within 2 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160)
	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129)
	at io.quarkus.it.opentelemetry.LoggingResourceTest.testException(LoggingResourceTest.java:113)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

@brunobat
Copy link
Contributor Author

Hi @karesti, how does it look?

@karesti
Copy link
Member

karesti commented Jun 11, 2025

@brunobat There have been a lot of changes, so I can't say for sure that everything is working on my side yet. I need more time to finish upgrading, and I'm also dealing with some other Quarkus-related issues. That said, I'm no longer seeing the error I was getting when building with this branch, so I think it's okay for now. If I run into any related issues, I'll report them as soon as I can.

@brunobat brunobat merged commit 67b95e5 into quarkusio:main Jun 18, 2025
60 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.25 - main milestone Jun 18, 2025
@rsvoboda
Copy link
Member

@brunobat please add entry into https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.25

I noticed QS is failing because of this bump, I will prepare PR and add you for review.

@brunobat
Copy link
Contributor Author

There is a new plan, I'm going to revert this code.

@karesti
Copy link
Member

karesti commented Aug 5, 2025

@brunobat I'm working on the upgrade of Quarkus, is there a visibility of the new plan ?

@brunobat
Copy link
Contributor Author

brunobat commented Aug 5, 2025

This will not be part of Quarkus 3.x core, as discussed here: #users > Micrometer Prometheus client v1.0 breaking changes @ 💬

The reason is the breaking changes that would need to be introduced. The community did not agree with this PR.
Support for the new client will only happen on Quarkus 4.x, with no timeline yet.

I'm working on a Quarkiverse extension to support this registry for the current 3.x.

@gsmet gsmet changed the title [Breaking change] Use prometheus client v1 on Micrometer Use prometheus client v1 on Micrometer and update Micrometer to 1.15 Aug 7, 2025
@gsmet gsmet removed this from the 3.25.0.CR1 milestone Aug 7, 2025
@gsmet
Copy link
Member

gsmet commented Aug 7, 2025

This PR was reverted in #48498 .

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

Labels

area/dependencies Pull requests that update a dependency file area/documentation area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure area/metrics triage/flaky-test

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Support io.micrometer.prometheusmetrics.PrometheusMeterRegistry

5 participants