Skip to content

GrpcClientMetricAutoConfiguration breaks system metrics #992

@SoMuchForSubtlety

Description

@SoMuchForSubtlety

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
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething does not work as expected

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions