trace: clarify how gRPC options work
@@ -230,13 +230,16 @@ func requestHook(ctx context.Context, req *http.Request) func(resp *http.Respons
}
}
-// EnableGRPCTracingDialOption enables tracing of requests that are sent over a
-// gRPC connection.
+// EnableGRPCTracingDialOption traces all outgoing requests from a gRPC client.
+// The calling context should already have a *trace.Span; a child span will be
+// created for the outgoing gRPC call. If the calling context doesn't have a span,
+// the call will not be traced.
+//
// The functionality in gRPC that this relies on is currently experimental.
var EnableGRPCTracingDialOption grpc.DialOption = grpc.WithUnaryInterceptor(grpc.UnaryClientInterceptor(grpcUnaryInterceptor))
-// EnableGRPCTracing enables tracing of requests for clients that use gRPC
-// connections.
+// EnableGRPCTracing automatically traces all gRPC calls from cloud.google.com/go clients.
+//
// The functionality in gRPC that this relies on is currently experimental.
var EnableGRPCTracing option.ClientOption = option.WithGRPCDialOption(EnableGRPCTracingDialOption)
