Is your feature request related to a problem? Please describe
Currently, the graphql instrumentation packages adds spans for all resolvers where span name equals to graphql.resolve. Here's how it looks in datadog for example:
However, to have improved DX, the span name could contain the actual path.
Describe the solution you'd like to see
Something like graphl.resolve - <path> as the span name would make this much better:
Should this be the default behavior?
Should this be under an option?
Should the instrumentation offer a hook for every span added, so we could change it, including changing span name or adding attributes?
Describe alternatives you've considered
The most obvious workound is to add a processor that changes the span name:
if (span.name === 'graphql.resolve' && span.attributes['graphql.field.path']) {
span.updateName(`${span.name} ${span.attributes['graphql.field.path']}`);
}
Is your feature request related to a problem? Please describe
Currently, the
graphql
instrumentation packages adds spans for all resolvers where span name equals tographql.resolve
. Here's how it looks in datadog for example:However, to have improved DX, the span name could contain the actual path.
Describe the solution you'd like to see
Something like
graphl.resolve - <path>
as the span name would make this much better:Describe alternatives you've considered
The most obvious workound is to add a processor that changes the span name: