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
FieldsFields 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 InstrumentationState
createState
(InstrumentationCreateStateParameters parameters) This will be called just before execution to create an object that is given back to all instrumentation methods to allow them to have per execution request state@NotNull 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
beginExecuteOperation, beginExecuteOperation, beginExecution, beginExecution, beginExecutionStrategy, beginExecutionStrategy, beginField, beginField, beginFieldComplete, beginFieldComplete, beginFieldFetch, beginFieldListComplete, beginFieldListComplete, beginParse, beginSubscribedFieldEvent, beginSubscribedFieldEvent, beginValidation, createState, createStateAsync, instrumentDataFetcher, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionContext, instrumentExecutionInput, instrumentExecutionInput, instrumentExecutionResult, instrumentSchema, instrumentSchema
-
Field Details
-
options
-
-
Constructor Details
-
TracingInstrumentation
public TracingInstrumentation() -
TracingInstrumentation
-
-
Method Details
-
createState
@Nullable public @Nullable InstrumentationState createState(InstrumentationCreateStateParameters parameters) Description copied from interface:Instrumentation
This will be called just before execution to create an object that is given back to all instrumentation methods to allow them to have per execution request state- Specified by:
createState
in interfaceInstrumentation
- Overrides:
createState
in classSimplePerformantInstrumentation
- Parameters:
parameters
- the parameters to this step- Returns:
- a state object that is passed to each method
-
instrumentExecutionResult
@NotNull public @NotNull 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.createState(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.createState(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.createState(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.createState(InstrumentationCreateStateParameters)
- Returns:
- a nullable
InstrumentationContext
object that will be called back when the step ends (assuming it's not null)
-