@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/9127") public final class OrcaMetricReportingServerInterceptor extends Object implements ServerInterceptor
ServerInterceptor that intercepts a ServerCall by running server-side RPC
handling under a Context that records custom per-request metrics provided by server
applications and sends to client side along with the response in the format of Open Request
Cost Aggregation (ORCA).| Modifier and Type | Method and Description |
|---|---|
static OrcaMetricReportingServerInterceptor |
getInstance() |
<ReqT,RespT> |
interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next)
|
public static OrcaMetricReportingServerInterceptor getInstance()
public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
ServerInterceptorServerCall dispatch by the next ServerCallHandler. General
semantics of ServerCallHandler.startCall(io.grpc.ServerCall<RequestT, ResponseT>, io.grpc.Metadata) apply and the returned
ServerCall.Listener must not be null.
If the implementation throws an exception, call will be closed with an error.
Implementations must not throw an exception if they started processing that may use call on another thread.
interceptCall in interface ServerInterceptorcall - object to receive response messagesheaders - which can contain extra call metadata from ClientCall.start(io.grpc.ClientCall.Listener<RespT>, io.grpc.Metadata),
e.g. authentication credentials.next - next processor in the interceptor chaincall, never null.