Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring boot runtime metrics naive reduced #13173

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

zeitlinger
Copy link
Member

trimmed down version of #13078

@zeitlinger zeitlinger requested a review from a team as a code owner February 3, 2025 09:48
@zeitlinger zeitlinger self-assigned this Feb 3, 2025
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Feb 3, 2025
@zeitlinger zeitlinger closed this Feb 3, 2025
@zeitlinger zeitlinger reopened this Feb 3, 2025
@zeitlinger
Copy link
Member Author

@jeanbisutti here's a version that supports a subset of metrics for native mode - I'd suggest we start here and add more coverage for native mode later

@zeitlinger zeitlinger force-pushed the spring-boot-runtime-metrics-naive-reduced branch from 0545a83 to 7c68b99 Compare February 3, 2025 14:37
@jeanbisutti
Copy link
Member

here's a version that supports a subset of metrics for native mode

@zeitlinger Could you please elaborate a bit what this PR is doing?

@zeitlinger
Copy link
Member Author

here's a version that supports a subset of metrics for native mode

@zeitlinger Could you please elaborate a bit what this PR is doing?

sure @jeanbisutti

Initially, I tried to add all runtime metric features to native image - but it got too difficult.
Therefore, this PR supports everything that I got working so far, which is all except:

@jeanbisutti
Copy link
Member

@zeitlinger

In the tests, JFR is now not enable at the the build time: 6850c88#diff-75989ca3659128c1bc6aea21d1129a7a704b98959fad35345d5c3c216c53c91cL71

Is it related to the native build failure mentioned in #13078 (comment)?

If there is JFR-related code, even programmatically disabled, could you please renable JFR at build time in the tests to check potential issues at the build time?

Ideally, if the JFR code can't be used in the native image, I would prefer to not include it at the build time (see #13078 (comment)) to avoid side effects at the build time (and help limit the native image size).

@zeitlinger
Copy link
Member Author

@zeitlinger

In the tests, JFR is now not enable at the the build time: 6850c88#diff-75989ca3659128c1bc6aea21d1129a7a704b98959fad35345d5c3c216c53c91cL71

Is it related to the native build failure mentioned in #13078 (comment)?

yes
I realized that the failure could either be caused by enabling JFR - or by using graal 23

If there is JFR-related code, even programmatically disabled, could you please renable JFR at build time in the tests to check potential issues at the build time?

JFR is enabled differently based on the graalvm version.
We should first figure out which versions we want to support - then we can add the flags in the test.

Ideally, if the JFR code can't be used in the native image, I would prefer to not include it at the build time (see #13078 (comment)) to avoid side effects at the build time (and help limit the native image size).

I don't think it's enabled - can you point me to the relevant change?

@jeanbisutti
Copy link
Member

I realized that the failure could either be caused by enabling JFR - or by using graal 23

and/or new added code causing build time issues

I don't think it's enabled - can you point me to the relevant change?

It's not what I have said. There is JFR-related code programatically disabled at runtime (

), but processed during the native image compilation. It would be safer to not include this code in the native image compilation, or alternatively be more exhaustive in the native tests (with JFR enabled at build time, ...). The first option would be my preference because less supposed to add side effects at the build time (and it would help limit a bit the native image size).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test native This label can be applied to PRs to trigger them to run native tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants