-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we clarify why external services spans are not Measured ? #1006
Comments
Hi, @hexa00. Sorry for the frustration. The basic reasoning is that metrics today are calculated based on e.g.
and
The decision was then made at a product level (across all languages) to have client integration spans not be measured. There is ongoing work to improve this situation, but in the short term we can look at solutions for allowing users to change the default behavior. We already have the What do you think? |
@knusbaum Thanks for the clarification about the conflicts, that makes more sense to me now! I would be in favor of adding a WithSpanOptions attribute for this use case and likely others. However I guess this doesn't help in the conflicting situation you described, since we can't override the operation name with an option :( I think the only way out of this would be to prefix/namespace the operation names so that they reflect their client/server nature... but would likely break a lot of things for people ? Also another idea I had as a workaround for us is to add the Measured() tag at the agent level so all the spans have it but we're unclear if the agent will assign tags to the spans or only to metrics... would you know about that ? |
@hexa00 Prefixing the operation names is not a bad idea, but the issue is that they are currently standard across the product (i.e. Adding the measured tag in the agent would likely result in an explosion of metrics, which may have an effect on billing, IIRC. More likely, we would do something like the processing pipeline (#360) that would allow users to modify spans/traces as they're completed before they get flushed to the agent. Please reach out to our support team as well and reference this issue. There is ongoing internal conversation about this issue and getting user input will be very helpful. |
In the Java tracer, incoming HTTP spans typically have the operation name "http.request" and outgoing HTTP calls are typically "http.client.request". Why is it different in different languages? |
@randallt This is likely a decision that was made a long time ago. The various tracers used to be a lot less cohesive in their implementations and tag choices. We've made a concerted effort to unify them over time, but there are still numerous deviations here and there. I think Python might also use
|
CC: @andrewsouthard1 |
Yeah, that's regrettable since the Datadog APM UI doesn't let you choose span.kind=client. You only get the operation name and the resource name. So it's important to distinguish incoming vs outgoing using either operation name or resource name. |
@randallt |
There is a note added to the FAQ about this: https://github.com/DataDog/dd-trace-go/blob/main/FAQ.md#why-do-client-integration-spans-not-use-the-global-service-name Please re-open this ticket if there is more work we can do. |
See this commit : 8fb554f
It mentions "We also don't measure spans that are for integrations for external service clients. This is a very generic class of integrations, and includes any integration for a package that is primarily an API to an external service. This includes SQL integrations, the aws integration, the client portion of the grpc integration, the http client integration, etc. This is actually most of our integrations. The reason for this is that there can be conflicts when measuring client spans that may cause inaccurate metrics."
This is a problem as un-measured spans can't be used in Monitors, thus for example if you want to setup a monitor on the error rate of your ElastiSearch client, well you can't, despite the data showing up on the dashboard.
See:
dd-trace-go/contrib/olivere/elastic/elastictrace.go
Line 52 in f86a82b
@knusbaum Could you please elaborate on what these conflict issues are? As this is quite frustrating :(
I'm open to workaround suggestions too.
Thanks
The text was updated successfully, but these errors were encountered: