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
Default metrics provided by spring-boot-actuator
don't work
#296
Comments
Awesome - can you provide a PR @chillleader or is this something we should give more thouht? Feeling-wise, the whole auto configuration could be worth to have a concentrated look when doing #275 |
Yes, I can provide an immediate fix by adding |
great stuff - from my perspective we can close this for now - I made a remark in #275 to have another look at it then |
I encountered this again in |
I can have a look at it - I think I have ideas why. Thanks for raising it! |
Ok - after trying out different things I have to confess I don't fully understand the problem ;-) The fix proposed in spring-projects/spring-boot#26684 also works for us, so if I add the following configuration, I have all metrics back - even without @Bean
InitializingBean forceMeterRegistryPostProcessor(BeanPostProcessor meterRegistryPostProcessor, MeterRegistry registry) {
return () -> meterRegistryPostProcessor.postProcessAfterInitialization(registry, "");
} There were further quite some discussions/problems with such things with various Spring Boot 2.x versions. My proposal is that we simply apply this workaround and do not try to understand the big picture fully. |
@chillleader Can you probably double check with latest main? Should be fixed with 1603539 |
Works like a charm ⭐ Thank you Bernd. |
i have the same problem, when I debuged MeterRegistryPostProcessor#postProcessAfterInitialization, then i try to solve the problem with this , but it doesn't works ,MeterRegistryPostProcessor can not be imported cause it's not public
|
Issue description
MetricsRecorder
bean declaration inspring-zeebe-starter
breaks the default metrics auto configurations provided by Spring Boot Actuator.spring-zeebe/client/spring-zeebe-starter/src/main/java/io/camunda/zeebe/spring/client/actuator/ZeebeActuatorConfiguration.java
Line 23 in 47e1513
Apparently, the
MeterRegistry
bean is eagerly injected, which breaks the initialization of other metrics. As a result, for, example, thejvm
metrics are missing in the actuator endpoint:Possible solution
MeterRegistry
bean with@Lazy
Similar issues with example solutions:
The text was updated successfully, but these errors were encountered: