Is your feature request related to a problem? Please describe.
The technical problem:
-
To propose changing the signature of dataFetcherInstrumenter (internal) in io.opentelemetry.instrumentation.graphql.v20_0.GraphqlInstrumenterFactory to Instrumenter<DataFetchingEnvironment, Object> (i.e. RESPONSE from Void to Object).
-
Additionally, the default createDataFetcherInstrumenter to set a SpanStatusExtractor to perform a result instanceof DataFetcherResult and use hasErrors() to set Span Status to Error before defaulting to the Throwable. Basically copying existing behaviour for operations.
The use case:
The GraphQL-Java framework allows DataFetchers to return DataFetcherResult DataFetcherResult - graphql-java 20.0 javadoc. This can contain errors objects that signify error that is currently missed unless you look at the operation span.
There is also no way to customise this behaviour through the incubating InstrumenterCustomizer because the input is missing.
Describe the solution you'd like
I think this should be a straightforward change if there are no objections. As described above.
Describe alternatives you've considered
It doesn’t seem that an alternative exists, but I’m open to suggestions.
Additional context
N/A
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Is your feature request related to a problem? Please describe.
The technical problem:
To propose changing the signature of
dataFetcherInstrumenter(internal) inio.opentelemetry.instrumentation.graphql.v20_0.GraphqlInstrumenterFactorytoInstrumenter<DataFetchingEnvironment, Object>(i.e.RESPONSEfromVoidtoObject).Additionally, the default
createDataFetcherInstrumenterto set aSpanStatusExtractorto perform aresult instanceof DataFetcherResultand usehasErrors()to set Span Status toErrorbefore defaulting to theThrowable. Basically copying existing behaviour for operations.The use case:
The GraphQL-Java framework allows DataFetchers to return
DataFetcherResultDataFetcherResult - graphql-java 20.0 javadoc. This can contain errors objects that signify error that is currently missed unless you look at the operation span.There is also no way to customise this behaviour through the incubating
InstrumenterCustomizerbecause the input is missing.Describe the solution you'd like
I think this should be a straightforward change if there are no objections. As described above.
Describe alternatives you've considered
It doesn’t seem that an alternative exists, but I’m open to suggestions.
Additional context
N/A
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding
+1orme too, to help us triage it. Learn more here.