Skip to content
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

GrpcClientMetricAutoConfiguration breaks system metrics #992

Closed
SoMuchForSubtlety opened this issue Nov 17, 2023 · 1 comment
Closed

GrpcClientMetricAutoConfiguration breaks system metrics #992

SoMuchForSubtlety opened this issue Nov 17, 2023 · 1 comment
Labels
bug Something does not work as expected

Comments

@SoMuchForSubtlety
Copy link

SoMuchForSubtlety commented Nov 17, 2023

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
})
@SoMuchForSubtlety SoMuchForSubtlety added the bug Something does not work as expected label Nov 17, 2023
@ST-DDT
Copy link
Collaborator

ST-DDT commented Nov 25, 2023

@ST-DDT ST-DDT closed this as completed Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as expected
Projects
None yet
Development

No branches or pull requests

2 participants