grpc-ecosystem / grpc-spring

Spring Boot starter module for gRPC framework.
https://grpc-ecosystem.github.io/grpc-spring/
Apache License 2.0
3.46k stars 811 forks source link

`GrpcClientMetricAutoConfiguration` breaks system metrics #992

Closed SoMuchForSubtlety closed 9 months ago

SoMuchForSubtlety commented 9 months ago

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?

Additional context

excluding the autoconfiguration class fixes the issue at the cost of grpc metrics

@SpringBootApplication(exclude = {
        GrpcClientMetricAutoConfiguration.class
})
ST-DDT commented 9 months ago

Duplicate of #859. Could you please check whether #907 fixes the issue for you? (And comment there)