Skip to content

Commit

Permalink
Remove unneeded span status extractor (#12182)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurit authored Sep 6, 2024
1 parent 84f2724 commit 45bfd32
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import graphql.schema.DataFetchingEnvironment;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.instrumentation.api.instrumenter.SpanStatusExtractor;
import io.opentelemetry.instrumentation.graphql.internal.OpenTelemetryInstrumentationHelper;

final class GraphqlInstrumenterFactory {
Expand All @@ -28,10 +27,6 @@ static Instrumenter<DataFetchingEnvironment, Void> createDataFetcherInstrumenter
INSTRUMENTATION_NAME,
environment -> environment.getExecutionStepInfo().getField().getName())
.addAttributesExtractor(new GraphqlDataFetcherAttributesExtractor())
.setSpanStatusExtractor(
(spanStatusBuilder, environment, unused, error) ->
SpanStatusExtractor.getDefault()
.extract(spanStatusBuilder, environment, null, error))
.setEnabled(enabled)
.buildInstrumenter();
}
Expand Down

0 comments on commit 45bfd32

Please sign in to comment.