mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
[baseserver] do not log grpc messages unless they contain an error
This commit is contained in:
parent
95ec04a005
commit
dc94adbbee
@ -269,6 +269,10 @@ func (s *Server) initializeGRPC() error {
|
||||
unary := []grpc.UnaryServerInterceptor{
|
||||
grpc_logrus.UnaryServerInterceptor(s.Logger(),
|
||||
grpc_logrus.WithDecider(func(fullMethodName string, err error) bool {
|
||||
// Skip logs for anything that does not contain an error.
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
// Skip gRPC healthcheck logs, they are frequent and pollute our logging infra
|
||||
return fullMethodName != "/grpc.health.v1.Health/Check"
|
||||
}),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user