contrib/google.golang.org/grpc
Those integration are enabled by having the
following import in the project’s orchestrion.tool.go file:
import (
_ "github.com/DataDog/orchestrion"
_ "github.com/DataDog/dd-trace-go/contrib/google.golang.org/grpc/v2" // integration
//...
)The Go implementation of gRPC.
Client
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 "github.com/DataDog/dd-trace-go/contrib/google.golang.org/grpc/v2" )grpc.WithChainStreamInterceptor(grpctrace.StreamClientInterceptor())// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "github.com/DataDog/dd-trace-go/contrib/google.golang.org/grpc/v2" )grpc.WithChainUnaryInterceptor(grpctrace.UnaryClientInterceptor())
Server
Call to
grpc.NewServerAppend the following
grpc.ServerOption arguments to the function call:// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "github.com/DataDog/dd-trace-go/contrib/google.golang.org/grpc/v2" )grpc.ChainStreamInterceptor(grpctrace.StreamServerInterceptor())// Using the following synthetic imports: import ( grpc "google.golang.org/grpc" grpctrace "github.com/DataDog/dd-trace-go/contrib/google.golang.org/grpc/v2" )grpc.ChainUnaryInterceptor(grpctrace.UnaryServerInterceptor())