Class ClientLoggingInterceptor

  • All Implemented Interfaces:
    io.grpc.ClientInterceptor

    public class ClientLoggingInterceptor
    extends Object
    implements io.grpc.ClientInterceptor
    A gRPC client interceptor that will log messages on the client.

    This is useful for debugging but should not be used in production as it will log the contents of messages.

    • Field Detail

      • TRACE_ID_KEY

        public static final io.grpc.Metadata.Key<String> TRACE_ID_KEY
    • Constructor Detail

      • ClientLoggingInterceptor

        public ClientLoggingInterceptor()
    • Method Detail

      • interceptCall

        public <ReqT,​RespT> io.grpc.ClientCall<ReqT,​RespT> interceptCall​(io.grpc.MethodDescriptor<ReqT,​RespT> method,
                                                                                     io.grpc.CallOptions options,
                                                                                     io.grpc.Channel next)
        Specified by:
        interceptCall in interface io.grpc.ClientInterceptor