-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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 2.5.5 upgrade 2.6.0 /actuator/prometheus path found missing (jvm_) related information #28840
Comments
Thanks for the report. Unfortunately, it doesn't not contain enough information for us to diagnose the problem. I would guess that, following the upgrade to 2.6.0, something is triggering premature initialising of the meter registry which prevents it from being fully post-processed. To help us to figure out if that's the case, can you please provide a minimal sample that reproduces the problem? You can share it with us by zipping it up and attaching it to this issue or by pushing it to a separate repository on GitHub. |
@wilkinsona |
Sharing the log output of your application when the problem occurs may help. If the meter registry has been initialized prematurely, you should see several INFO level log messages similar to this:
You could also use the debugger to look at the chain of beans that is being created when the |
debug log
chain
|
The log shows several beans being created prematurely:
Unfortunately, the stack trace does not tell us the cause. If you cannot provide a sample that reproduces the problem, you will have to use the debugger to manually look through the chain of beans that is being created. It would appear that |
@wilkinsona Thank you for your tips. I successfully found the key to the problem by observing the bean chain. The deep call chain and my current understanding of Spring cannot directly fix this problem. Reproduce the sample below. |
Thanks for the sample. Caching is implemented via proxying and those proxies are created via bean post-processing. It's not clear from your minimal example why your I'm going to close this issue as I don't believe there's anything to be done in Spring Boot. While investigating, I did notice that it appears to be impossible to define a bean that implements |
Having discussed this with @snicoll, I have opened spring-projects/spring-framework#27751. |
Thanks team |
debug found that the MeterRegistryPostProcessors class is not returned in the list when getBeanPostProcessors() is called.
This phenomenon appeared in my project, but the problem did not reappear in another project with exactly the same package. The only difference from the previous one was the upgrade of spring boot 2.6.0
The text was updated successfully, but these errors were encountered: