gRPC Client/Server Configuration for Inferred Peer Services (dd-trace-go ≥ v1.53.0) #3724
Replies: 1 comment 1 reply
-
IDK the answer of the top of my head. If you're in need of a timely response, I'd suggest to raise a request with our helpdesk. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Datadog team,
I'm working with dd-trace-go and exploring the inferred service naming functionality introduced in version v1.53.0.
As per the release notes, the Go tracer supports inferred peer service names for outbound dependencies. I understand this can be enabled by setting the following environment variables:
We are using gRPC for inter-service communication and want to ensure spans show correct service-to-service mappings in the Trace Map, especially in a BFF architecture where one service (A) calls many others (B, C, D...) via gRPC.
Questions:
What is the recommended way to configure the gRPC client and server interceptors in this scenario using dd-trace-go, when the proto-defined service names (e.g., tts.UserService) don't match the target service's actual DD_SERVICE value (e.g., user-service)?
Should we use grpctrace.WithSpanOptions(tracer.Tag(ext.PeerService, "user-service")) in client interceptors to override the inferred service name? Or is it better to rely on DD_TRACE_PEER_SERVICE_MAPPING for all such mappings?
Do you have an example of best practices for configuring gRPC tracing (both client and server) to take full advantage of the inferred peer service naming mechanism?
We want to avoid the fallback grpc.client/grpc.message naming and ensure accurate, clean service relationships in both the Trace Map and service overview dashboards.
Thanks for your guidance!
Beta Was this translation helpful? Give feedback.
All reactions