-
Notifications
You must be signed in to change notification settings - Fork 279
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
Include request
span in spec_compliant mode
#5282
Comments
I'm not sure to understand your need. Indeed there is not request span in |
@bnjjj Can you share what part of the Otel spec we are complying with? I linked above another issue but currently in But what is the spec that says there can not be a span called |
The one mentioned by Bryn here |
The current state of the GraphQL span conventions is Given that the specification for GraphQL spans has not been officially finalized by OTEL, it may not be necessary to strict adherence to the experimental spec. Adopting a more flexible stance could facilitate a smoother transition away from Additionally, this approach can provide better support for Datadog's integration as highlighted in this discussion. |
I've added a suggestion for us to implement here: #5261 (comment) I also agree that dynamic span names is strange, not only in the in the semantic conventions, but also in the Datadog exporter in otel rust there is span mapping functionality that also does this. |
@Samjin Could you please confirm that the suggestion in @BrynCooke's comment above would satisfactorily close this issue as well? Thanks! 🙇 |
Thank you all for adding the option 👍 . Currently, I'm uncertain whether the lack of a request span will result in any missing ![]() ![]() If we designate the router span as the service entry point, a possible workaround could involve updating dd resource mapping with something like |
@Samjin your suggestion about the resource mapping is valid. I opened a draft PR to fix this. It will require some testing to be able to merge it. |
Based on the draft PR, It looks like
That said, with proper span resource, Datadog user can exclude some custom instrumentations from apollo and save cost eventually. e.g. DD user can use |
Additionally, if request won't be added, it'd be great if the resource mapping can be configurable so user can choose what resource they need without asking Apollo. |
Here's some background to the thinking on this: We're trying to get to the situation where APMs that natively understand otel specs can work out of the box. So this means following the otel spec as closely as we can. The lifecycle stages that we have in the router are:
The The router span doesn't have anything graphql specific in it, it's just bytes at this point, and so we'd like this to match - https://opentelemetry.io/docs/specs/semconv/http/http-spans/#http-server The supergraph span is where we know we are dealing with a graphql request and will be - https://opentelemetry.io/docs/specs/semconv/graphql/graphql-spans/ Subgraph spans are not mentioned in the spec. Http client - should match https://opentelemetry.io/docs/specs/semconv/http/http-spans/#http-client Going forward
I think your idea of allowing more configurable span mappings is a good one would the following be sufficient?
Where:
@Samjin Would this be sufficient? This would give you the span naming patterns that you desire without reintroducing the request span. |
Thank you, @BrynCooke, for the clarification provided. I am uncertain that APMs(in our case dd APM) are fully capable of interpreting the otel spec without some form of explicit instrumentation at this stage. That said I think it's fine we proceed with the approach you've suggested for now, and we'll get better understanding through testing. |
I'll be doing some testing on datadog as part of this work, so will circle back when we know more. |
https://www.datadoghq.com/blog/node-monitoring-apm/#out-of-the-box-support-for-nodejs-monitoring DD auto instrument common used framework such as I also looked up universal-service-monitoring which would provide |
Is your feature request related to a problem? Please describe.
In
deprecated
mode the Router adds therequest
spanrouter/apollo-router/src/plugins/telemetry/span_factory.rs
Lines 70 to 72 in 97e7605
In the new
spec_compliant
mode this span was removedDescribe the solution you'd like
I would like to include this span so that the service entry point from DataDog is consistent
Describe alternatives you've considered
I could possibly add a custom collector to rename spans
Additional context
This will also help keep span name cardinality down even if this span is added back: #5261
The text was updated successfully, but these errors were encountered: