Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
fix: updated MetricsInstrumentation to implement correct instrumentEx…
Browse files Browse the repository at this point in the history
…ecutionResult method
  • Loading branch information
bsara committed Jun 7, 2023
1 parent 432b463 commit 4c5a3e0
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package graphql.kickstart.autoconfigure.web.servlet.metrics;

import graphql.ExecutionResult;
import graphql.execution.instrumentation.InstrumentationState;
import graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters;
import graphql.execution.instrumentation.tracing.TracingInstrumentation;
import io.micrometer.core.instrument.MeterRegistry;
Expand Down Expand Up @@ -39,6 +40,12 @@ public MetricsInstrumentation(MeterRegistry meterRegistry, boolean tracingEnable
@Override
public CompletableFuture<ExecutionResult> instrumentExecutionResult(
ExecutionResult executionResult, InstrumentationExecutionParameters parameters) {
return this.instrumentExecutionResult(executionResult, parameters, null);
}

@Override
public CompletableFuture<ExecutionResult> instrumentExecutionResult(
ExecutionResult executionResult, InstrumentationExecutionParameters parameters, InstrumentationState rawState) {

if (executionResult.getExtensions() != null
&& executionResult.getExtensions().containsKey(TRACING)) {
Expand Down

0 comments on commit 4c5a3e0

Please sign in to comment.