After update Spring(2.4.2 -> 2.5.0) i can't see jvm metric by url
http://localhost:8080/application/actuator/prometheus
dependency report: https://scans.gradle.com/s/aof3kiwqv7mae
i start debugging and found some interesting:
MeterRegistryPostProcessor.postProcessAfterInitialization() - condition if (bean instanceof MeterRegistry)
is never true.
I think problem in order. I mark some breakPoint:
1) created bean MeterRegistryPostProcessor.
2) execute method AbstractAutowireCapableBeanFactory.doCreateBean for bean PrometheusMeterRegistry
2.1) created bean PrometheusMeterRegistry
2.2) execute initializeBean() witch execute method applyBeanPostProcessorsBeforeInitialization(). In debbug mode i see, then in list of beanPostProcessor do not contains MeterRegistryPostProcessor
proof:
2.3) MeterRegistryPostProcessor.postProcessAfterInitialization() do not execute on bean PrometheusMeterRegistry.
3) Execute AbstractBeanFactory.addBeanPostProcessors() and in debuggin mode i see than MeterRegistryPostProcessor add to context
How i undersend problem: MeterRegistryPostProcessor do not add to context before created bean PrometheusMeterRegistry
Comment From: bclozel
Is there a chance this is a duplicate of #26630 ? Could you check if 2.5.1 solves the issue in your application?
Comment From: Monax111
yep. With 2.5.1 it's work
Comment From: snicoll
Thanks for following up.