grpc-ecosystem / grpc-spring

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

Fix classNotFoundException when using old version of io.micrometer:mi… #957

Closed echemezov closed 11 months ago

echemezov commented 1 year ago

Classes io.micrometer.core.instrument.binder.grpc.MetricCollectingServerInterceptor and io.micrometer.core.instrument.binder.grpc.MetricCollectingClientInterceptor are not available in old versions of io.micrometer:micrometer-core (for example in 1.5.1) but io.micrometer.core.instrument.MeterRegistry used as a condition for GrpcClientMetricAutoConfiguration and GrpcServerMetricAutoConfiguration exists.

In result, application fails on start with ClassNotFoundException when there is MeterRegistry but no grpc interceptor classes.