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

     1  package grpccorrelation
     2  
     3  import (
     4  	grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
     5  	"google.golang.org/grpc"
     6  )
     7  
     8  // UnaryServerTracingInterceptor will create a unary server tracing interceptor.
     9  func UnaryServerTracingInterceptor() grpc.UnaryServerInterceptor {
    10  	return grpc_opentracing.UnaryServerInterceptor(grpc_opentracing.WithFilterFunc(healthCheckFilterFunc))
    11  }
    12  
    13  // StreamServerTracingInterceptor will create a streaming server tracing interceptor.
    14  func StreamServerTracingInterceptor() grpc.StreamServerInterceptor {
    15  	return grpc_opentracing.StreamServerInterceptor()
    16  }