google.golang.org/grpc
The Go implementation of gRPC.
Add gRPC client interceptors
One of
- Call to
grpc.Dial
- Call to
grpc.DialContext
- Call to
grpc.NewClient
Append the following
grpc.DialOption
arguments to the function call:// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc" )
grpc.WithChainStreamInterceptor(grpctrace.StreamClientInterceptor())
// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc" )
grpc.WithChainUnaryInterceptor(grpctrace.UnaryClientInterceptor())
Add gRPC server interceptors
Call to
grpc.NewServer
Append the following
grpc.ServerOption
arguments to the function call:// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc" )
grpc.ChainStreamInterceptor(grpctrace.StreamServerInterceptor())
// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/google.golang.org/grpc" )
grpc.ChainUnaryInterceptor(grpctrace.UnaryServerInterceptor())