gitlab.com/gitlab-org/labkit@v1.21.0/tracing/grpc/client_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  // UnaryClientTracingInterceptor will create a unary client tracing interceptor.
     9  func UnaryClientTracingInterceptor() grpc.UnaryClientInterceptor {
    10  	return grpc_opentracing.UnaryClientInterceptor(grpc_opentracing.WithFilterFunc(healthCheckFilterFunc))
    11  }
    12  
    13  // StreamClientTracingInterceptor will create a streaming client tracing interceptor.
    14  func StreamClientTracingInterceptor() grpc.StreamClientInterceptor {
    15  	return grpc_opentracing.StreamClientInterceptor()
    16  }