graphql.execution.instrumentation.tracing.TracingInstrumentation Maven / Gradle / Ivy
package graphql.execution.instrumentation.tracing;
import graphql.ExecutionResult;
import graphql.ExecutionResultImpl;
import graphql.PublicApi;
import graphql.execution.instrumentation.Instrumentation;
import graphql.execution.instrumentation.InstrumentationContext;
import graphql.execution.instrumentation.InstrumentationState;
import graphql.execution.instrumentation.SimpleInstrumentation;
import graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters;
import graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters;
import graphql.execution.instrumentation.parameters.InstrumentationValidationParameters;
import graphql.language.Document;
import graphql.validation.ValidationError;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import static graphql.execution.instrumentation.SimpleInstrumentationContext.whenCompleted;
/**
* This {@link Instrumentation} implementation uses {@link TracingSupport} to
* capture tracing information and puts it into the {@link ExecutionResult}
*/
@PublicApi
public class TracingInstrumentation extends SimpleInstrumentation {
@Override
public InstrumentationState createState() {
return new TracingSupport();
}
@Override
public CompletableFuture instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters) {
Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy