Class TracingInstrumentation
java.lang.Object
graphql.execution.instrumentation.SimplePerformantInstrumentation
graphql.execution.instrumentation.tracing.TracingInstrumentation
- All Implemented Interfaces:
Instrumentation
This
Instrumentation implementation uses TracingSupport to
capture tracing information and puts it into the ExecutionResult-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class graphql.execution.instrumentation.SimplePerformantInstrumentation
INSTANCE -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbeginFieldFetch(InstrumentationFieldFetchParameters parameters, InstrumentationState rawState) This is called just before a fieldDataFetcheris invoked.beginParse(InstrumentationExecutionParameters parameters, InstrumentationState rawState) This is called just before a query is parsed.beginValidation(InstrumentationValidationParameters parameters, InstrumentationState rawState) This is called just before the parsed query document is validated.@Nullable CompletableFuture<InstrumentationState> createStateAsync(InstrumentationCreateStateParameters parameters) This will be called just before execution to create an object, in an asynchronous manner, that is given back to all instrumentation methods to allow them to have per execution request state@NonNull CompletableFuture<ExecutionResult> instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters, InstrumentationState rawState) This is called to allow instrumentation to instrument the execution result in some wayMethods inherited from class graphql.execution.instrumentation.SimplePerformantInstrumentation
beginExecuteObject, beginExecuteOperation, beginExecution, beginExecutionStrategy, beginFieldCompletion, beginFieldExecution, beginFieldListCompletion, beginSubscribedFieldEvent, createState, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionInput, instrumentSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface graphql.execution.instrumentation.Instrumentation
beginDeferredField, beginFieldFetching, beginReactiveResults
-
Constructor Details
-
TracingInstrumentation
public TracingInstrumentation() -
TracingInstrumentation
-
-
Method Details
-
createStateAsync
public @Nullable CompletableFuture<InstrumentationState> createStateAsync(InstrumentationCreateStateParameters parameters) Description copied from interface:InstrumentationThis will be called just before execution to create an object, in an asynchronous manner, that is given back to all instrumentation methods to allow them to have per execution request state- Specified by:
createStateAsyncin interfaceInstrumentation- Overrides:
createStateAsyncin classSimplePerformantInstrumentation- Parameters:
parameters- the parameters to this step- Returns:
- a state object that is passed to each method
-
instrumentExecutionResult
public @NonNull CompletableFuture<ExecutionResult> instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters, InstrumentationState rawState) Description copied from interface:InstrumentationThis is called to allow instrumentation to instrument the execution result in some way- Specified by:
instrumentExecutionResultin interfaceInstrumentation- Overrides:
instrumentExecutionResultin classSimplePerformantInstrumentation- Parameters:
executionResult-CompletableFutureof the result to instrumentparameters- the parameters to this steprawState- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)- Returns:
- a new execution result completable future
-
beginFieldFetch
public InstrumentationContext<Object> beginFieldFetch(InstrumentationFieldFetchParameters parameters, InstrumentationState rawState) Description copied from interface:InstrumentationThis is called just before a fieldDataFetcheris invoked.- Specified by:
beginFieldFetchin interfaceInstrumentation- Overrides:
beginFieldFetchin classSimplePerformantInstrumentation- Parameters:
parameters- the parameters to this steprawState- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)- Returns:
- a nullable
InstrumentationContextobject that will be called back when the step ends (assuming it's not null)
-
beginParse
public InstrumentationContext<Document> beginParse(InstrumentationExecutionParameters parameters, InstrumentationState rawState) Description copied from interface:InstrumentationThis is called just before a query is parsed.- Specified by:
beginParsein interfaceInstrumentation- Overrides:
beginParsein classSimplePerformantInstrumentation- Parameters:
parameters- the parameters to this steprawState- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)- Returns:
- a nullable
InstrumentationContextobject that will be called back when the step ends (assuming it's not null)
-
beginValidation
public InstrumentationContext<List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters, InstrumentationState rawState) Description copied from interface:InstrumentationThis is called just before the parsed query document is validated.- Specified by:
beginValidationin interfaceInstrumentation- Overrides:
beginValidationin classSimplePerformantInstrumentation- Parameters:
parameters- the parameters to this steprawState- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)- Returns:
- a nullable
InstrumentationContextobject that will be called back when the step ends (assuming it's not null)
-