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
Metrics are missing "jvm_*" if "@EnableGlobalMethodSecurity" is used #26684
Comments
Thanks for the report. I can't say for sure as you haven't shared a sample but there was a regression in that area that was fixed in |
I am using the /metrics actuator endpoint and I can also see that the following metrics are not present in 2.5.0 and were in 2.4.6. NOTE: I am using @EnableGlobalMethodSecurity as well.
I could not try with 2.5.1-SNAPSHOT as maven did not find it, in which maven public repo is that available? |
Please explore a project on start.spring.io using |
Yes, I tried |
@silver-mx alright, another problem then. Can you please share a small sample that reproduces the problem? You can attach the zip here or share a link to a GitHub repo. |
Just to be sure. As I mentioned, the reported problem is fixed in the version |
Ah sorry, more coffee needed here! I read your feedback backwards. Thanks for confirming that @lathspell can you please try with |
…3, java-jwt 3.15.0 -> 3.16.0, modelmapper 2.4.0 -> 2.4.4 and bootstrap 4.6.0-1 -> 5.0.1. Upgraded Docker images jboss/keycloak 13.0.0 -> 13.0.1, openjdk 11.0.10-slim -> 11.0.11-slim and mongo 4.4.5 -> 4.4.6. Fixed upgrade issues: 1) Missing resilience4j metrics (spring-projects/spring-boot#26684) Fixed in 2.5.1. Use 2.5.1-SNAPSHOT meanwhile. (Needs https://repo.spring.io/snapshot repositories.) 2) WireMock stubbing of OIDC provider JWKS API must be moved from @beforeeach to @BeforeAll method. 3) Replace deprecated ClientAuthenticationMethod.BASIC by ClientAuthenticationMethod.CLIENT_SECRET_BASIC.
I can confirm that 2.5.1-SNAPSHOT fixes the problem. I now see 48 metrics starting with "jvm" again. |
Brilliant. Thanks for testing the snapshot @lathspell! Closing as a duplicate of #26630 |
After upgrading from SpringBoot 2.4.x to SpringBoot 2.5.0, I noticed that all the "jvm_" metrics are missing from the "/actuator/prometheus" output. Other metrics like "tomcat_", "hikari_*" and my custom ones were still present.
In https://stackoverflow.com/questions/57607445/spring-actuator-jvm-metrics-not-showing-when-globalmethodsecurity-is-enabled it was suggested that the problem might be cause by enabling "@EnableGlobalMethodSecurity" which I happen to use in this project.
The below quoted workaround did indeed fix the problem for me:
The text was updated successfully, but these errors were encountered: