datadog-grpc-trace-example icon indicating copy to clipboard operation
datadog-grpc-trace-example copied to clipboard

gRPC Tracing example with datadog go tracer

Datadog gRCP Tracing Example

This repo shows you how to trace gRPC with Datadog APM (go tracer).

Instrumentation

Client Side

	conn, err := grpc.Dial(
		address,
		grpc.WithInsecure(),
		grpc.WithUnaryInterceptor(
			grpctrace.UnaryClientInterceptor(datadogAPMServiceName, tracer.DefaultTracer),
		),
	)

You can see the details here: greeter_client/main.go

Server Side

	s := grpc.NewServer(
		grpc.UnaryInterceptor(
			grpctrace.UnaryServerInterceptor(datadogAPMServiceName, tracer.DefaultTracer),
		),
	)

You can see the details here: greeter_server/main.go

Screenshots

2017-09-11 17 33 35 2017-09-11 17 33 52 2017-09-11 17 33 56 2017-09-11 17 34 01 2017-09-11 17 34 10

Resources