google.golang.org/grpc

The Go implementation of gRPC.

Add gRPC client interceptors

Join Point
One of
Advice
Append the following grpc.DialOption arguments to the function call:
  1. // 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.WithStreamInterceptor(grpctrace.StreamClientInterceptor())
  2. // 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.WithUnaryInterceptor(grpctrace.UnaryClientInterceptor())

Add gRPC server interceptors

Join Point
Advice
Append the following grpc.ServerOption arguments to the function call:
  1. // 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.StreamInterceptor(grpctrace.StreamServerInterceptor())
  2. // 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.UnaryInterceptor(grpctrace.UnaryServerInterceptor())