"@opentelemetry/api": "^1.4.1"
What version of Node are you using? What did you do?
I enabled the auto instrumentation with ignoreTrivialResolveSpans
option enabled
new GraphQLInstrumentation({
ignoreTrivialResolveSpans: true
})
Expected:
What did you expect to see?The resolves that don't have any custom implementation don't generate any span
What did you see instead?All resolves generate a corresponding span
Additional contextDigging into Apollo's implementation, I found that when it loads its internal plugins, it always wraps the field.resolve
with a function that executes the default or the user-defined resolver, as you can see here:
For that reason, this condition:
if (field.resolve) { field.resolve = wrapFieldResolver(tracer, getConfig, field.resolve); }evaluates true for all resolvers (including the default ones) and always ends up instrumenting all field resolvers
zanemcca, bmbferreira, klippx, Manivela and marco2216
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4