Closed
Description
The context
Adding grpc-client-spring-boot-starter
as a dependency breaks micrometer system metrics. (e.g. system_cpu_usage
is no longer present)
The bug
GrpcClientMetricAutoConfiguration
breaks bean post-processing for micrometer registry beans. This blog post has a good explanation.
Stacktrace and logs
2023-11-17 14:25:06.469 INFO 83909 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'prometheusMeterRegistry' of type [io.micrometer.prometheus.PrometheusMeterRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
The application's environment
Which versions do you use?
- Spring boot: 2.7.14
- grpc-java: 1.51.0
- grpc-spring-boot-starter: 2.14.0.RELEASE
- java: 17 (amd64)
- micrometer-core: 1.9.13
- spring-boot-starter-actuator: 2.7.14
Additional context
excluding the autoconfiguration class fixes the issue at the cost of grpc metrics
@SpringBootApplication(exclude = {
GrpcClientMetricAutoConfiguration.class
})