Class MetricsClientInterceptor
java.lang.Object
net.devh.boot.grpc.client.metrics.MetricsClientInterceptor
- All Implemented Interfaces:
ClientInterceptor
A gRPC client interceptor that collects gRPC metrics.
Note: This class uses experimental grpc-java-API features.
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsClientInterceptor
(MeterRegistry registry, Supplier<Stopwatch> stopwatchSupplier) Creates a new gRPC client interceptor that collects metrics into the givenMeterRegistry
.MetricsClientInterceptor
(MetricsClientMeters meters, Supplier<Stopwatch> stopwatchSupplier) -
Method Summary
Modifier and TypeMethodDescription<ReqT,
RespT>
ClientCall<ReqT,RespT> interceptCall
(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next)
-
Constructor Details
-
MetricsClientInterceptor
Creates a new gRPC client interceptor that collects metrics into the givenMeterRegistry
.- Parameters:
registry
- The MeterRegistry to use.
-
MetricsClientInterceptor
-
-
Method Details
-
interceptCall
public <ReqT,RespT> ClientCall<ReqT,RespT> interceptCall(MethodDescriptor<ReqT, RespT> method, CallOptions callOptions, Channel next) - Specified by:
interceptCall
in interfaceClientInterceptor
-