-
Notifications
You must be signed in to change notification settings - Fork 439
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
contrib: Update non-client contrib packages to measure their spans #603
Conversation
a24ca16
to
27c7640
Compare
27c7640
to
2eb1c21
Compare
2eb1c21
to
32a02a9
Compare
87fb359
to
f814af8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please set a proper title and a description to this PR? It doesn't look like "all contrib packages" to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly ok. How did you come up with the list of integrations to enable this for? I thought it's only for web frameworks but I also see Kafka.
Co-Authored-By: Gabriel Aszalos <[email protected]>
The criteria I was given was "every integration that's not a client for an external service." I know the kafka producer is a network client, but that one was explicitly approved. They decided to do the producer and skip the consumer. The rest end up being mostly http servers and grpc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and clean! :) Thanks!
…ataDog#603) This commit marks relevant spans in our integrations to be measured. Previously, choosing which spans are measured was done elsewhere. We are able to do this now that we have support for manually marking spans to be measured (DataDog#591). A relevant span is any span that sets a service name, and is likely to have a parent span from the user's code or a different integration. Any spans that will be children of spans from the same integration don't need to be measured. 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.
Until recently, spans were measured only when they were considered "top-level" for a service - i.e. their service name differed from their parent's. Now we have support for manually marking a span to be measured (#591).
Since we have this option, we want to mark relevant spans in our integrations to be measured. Any span that sets its own service name, and is most likely to have a parent span from the user's code or a different integration should be measured. Any spans that will be children of spans from the same integration don't need to be measured.
There is another caveat, which is that we don't want to 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.