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 fieldDataFetcher
is 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, instrumentSchema
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface graphql.execution.instrumentation.Instrumentation
beginDeferredField, beginFieldFetching
-
Constructor Details
-
TracingInstrumentation
public TracingInstrumentation() -
TracingInstrumentation
-
-
Method Details
-
createStateAsync
public @Nullable CompletableFuture<InstrumentationState> createStateAsync(InstrumentationCreateStateParameters parameters) Description copied from interface:Instrumentation
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- Specified by:
createStateAsync
in interfaceInstrumentation
- Overrides:
createStateAsync
in 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:Instrumentation
This is called to allow instrumentation to instrument the execution result in some way- Specified by:
instrumentExecutionResult
in interfaceInstrumentation
- Overrides:
instrumentExecutionResult
in classSimplePerformantInstrumentation
- Parameters:
executionResult
-CompletableFuture
of 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:Instrumentation
This is called just before a fieldDataFetcher
is invoked.- Specified by:
beginFieldFetch
in interfaceInstrumentation
- Overrides:
beginFieldFetch
in classSimplePerformantInstrumentation
- Parameters:
parameters
- the parameters to this steprawState
- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)
- Returns:
- a nullable
InstrumentationContext
object 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:Instrumentation
This is called just before a query is parsed.- Specified by:
beginParse
in interfaceInstrumentation
- Overrides:
beginParse
in classSimplePerformantInstrumentation
- Parameters:
parameters
- the parameters to this steprawState
- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)
- Returns:
- a nullable
InstrumentationContext
object 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:Instrumentation
This is called just before the parsed query document is validated.- Specified by:
beginValidation
in interfaceInstrumentation
- Overrides:
beginValidation
in classSimplePerformantInstrumentation
- Parameters:
parameters
- the parameters to this steprawState
- the state created during the call toInstrumentation.createStateAsync(InstrumentationCreateStateParameters)
- Returns:
- a nullable
InstrumentationContext
object that will be called back when the step ends (assuming it's not null)
-