Skip to content

Conversation

@mkouba
Copy link
Contributor

@mkouba mkouba commented Dec 4, 2025

  • if quarkus.builder.metrics.extended-capture=true
  • show the produced build items in the Dev UI
  • do not collect any metrics unless quarkus.builder.metrics.enabled=true or in the dev mode
  • deprecate quarkus.debug.dump-build-metrics

This could help analyzing the problems like the one mentioned in #51120.

@quarkus-bot

This comment has been minimized.

@mkouba mkouba force-pushed the build-metrics-produced-items branch from 40d5fa5 to e2b50ad Compare December 4, 2025 16:36
@quarkus-bot

This comment has been minimized.

Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 45 to 47
this.enabled = Boolean.getBoolean("quarkus.builder.metrics.enabled")
// This system property is deprecated and will be removed
|| Boolean.getBoolean("quarkus.debug.dump-build-metrics");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nitpick: I personally find Boolean.getBoolean, which resolves from a system property, very confusing...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mee too ;-). It should have been Boolean.getBooleanSystemProperty() or something like this. OTOH it's a one-liner and it somehow fits in this part of the code I think 🤷.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure yeah, as I said it's minor nitpick :)

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The or in do not collect any metrics unless quarkus.builder.metrics.enabled=true or in the dev mode bugs me a bit.

It's always enabled in dev mode? Could we make sure the cost is not too high if so because I remember similar infrastructure which had a relatively high cost.

Another alternative would be to only enable it if quarkus.builder.metrics.enabled=true and have the Dev UI page mention it if not enabled.

I made it Request for change so we clarify this, I'm fine with this approach if the impact is not too high.

@mkouba
Copy link
Contributor Author

mkouba commented Dec 5, 2025

The or in do not collect any metrics unless quarkus.builder.metrics.enabled=true or in the dev mode bugs me a bit.

It's always enabled in dev mode?

Yes, it is and it always was (since 2.11.0.CR1 where we introduced the build metrics in #25786).

Could we make sure the cost is not too high if so because I remember similar infrastructure which had a relatively high cost.

It should not be a problem for most apps. For example, for config-quickstart the generated JSON file is ~86KB and we only load it lazily when needed.

Another alternative would be to only enable it if quarkus.builder.metrics.enabled=true and have the Dev UI page mention it if not enabled.

I made it Request for change so we clarify this, I'm fine with this approach if the impact is not too high.

@mkouba mkouba requested a review from gsmet December 5, 2025 11:53
- if quarkus.builder.metrics.extended-capture=true
- show the produced build items in the Dev UI
- do not collect any metrics unless quarkus.builder.metrics.enabled=true
- in the dev mode, collect the metrics by default unless
  quarkus.builder.metrics.enabled=false
- deprecate quarkus.debug.dump-build-metrics
@mkouba mkouba force-pushed the build-metrics-produced-items branch from e2b50ad to becdd72 Compare December 5, 2025 15:35
@mkouba
Copy link
Contributor Author

mkouba commented Dec 5, 2025

@gsmet I wasn't able to get some consistent results on my machine. The augmentation time varies a lot, esp. for apps with a large number of extensions.

However, I made two more changes:

  1. quarkus.builder.metrics.enabled=false disables the build metrics even in the dev mode (UI is just empty). It is enabled by default.
  2. Unless quarkus.builder.metrics.extended-capture=true we collect exactly the same metrics as before, so we should not observe any regressions.

@quarkus-bot
Copy link

quarkus-bot bot commented Dec 5, 2025

Status for workflow Quarkus CI

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

✅ 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 21

📦 extensions/smallrye-reactive-messaging/deployment

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

  • Expecting actual: ["-4","-5","-6","-7","-8","-9","-10","-11"] to start with: ["-3", "-4", "-5", "-6"] - java.lang.AssertionError
java.lang.AssertionError: 

Expecting actual:
  ["-4","-5","-6","-7","-8","-9","-10","-11"]
to start with:
  ["-3", "-4", "-5", "-6"]

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

⚙️ MicroProfile TCKs Tests

📦 tcks/microprofile-lra

org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsUnavailable - History

  • Expecting the metric Compensated callback was called Expected: a value equal to or greater than <1> but: <0> was less than <1> - java.lang.AssertionError
java.lang.AssertionError: 
Expecting the metric Compensated callback was called
Expected: a value equal to or greater than <1>
     but: <0> was less than <1>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.eclipse.microprofile.lra.tck.TckRecoveryTests.assertMetricCallbackCalled(TckRecoveryTests.java:210)
	at org.eclipse.microprofile.lra.tck.TckRecoveryTests.testCancelWhenParticipantIsUnavailable(TckRecoveryTests.java:195)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants