gitlab.com/gitlab-org/labkit@v1.21.0/tracing/grpc/healthcheck_filter.go (about)

     1  package grpccorrelation
     2  
     3  import "context"
     4  
     5  // grpcHealthCheckMethodFullName is the name of the standard GRPC health check full method name.
     6  const grpcHealthCheckMethodFullName = "/grpc.health.v1.Health/Check"
     7  
     8  // healthCheckFilterFunc will exclude all GRPC health checks from tracing
     9  // since these calls are high frequency, but low value from a tracing point
    10  // of view, excluding them reduces the tracing load.
    11  func healthCheckFilterFunc(_ context.Context, fullMethodName string) bool {
    12  	return fullMethodName != grpcHealthCheckMethodFullName
    13  }