Class ServerLoggingInterceptor

  • All Implemented Interfaces:
    io.grpc.ServerInterceptor

    public class ServerLoggingInterceptor
    extends Object
    implements io.grpc.ServerInterceptor
    A gRPC server interceptor that will log messages on the server.

    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

      • ServerLoggingInterceptor

        public ServerLoggingInterceptor()
    • Method Detail

      • interceptCall

        public <ReqT,​RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall​(io.grpc.ServerCall<ReqT,​RespT> call,
                                                                                  io.grpc.Metadata headers,
                                                                                  io.grpc.ServerCallHandler<ReqT,​RespT> next)
        Specified by:
        interceptCall in interface io.grpc.ServerInterceptor