Class TracingInstrumentation
- java.lang.Object
-
- graphql.execution.instrumentation.SimplePerformantInstrumentation
-
- graphql.execution.instrumentation.tracing.TracingInstrumentation
-
- All Implemented Interfaces:
Instrumentation
@PublicApi public class TracingInstrumentation extends SimplePerformantInstrumentation
ThisInstrumentation
implementation usesTracingSupport
to capture tracing information and puts it into theExecutionResult
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TracingInstrumentation.Options
-
Field Summary
-
Fields inherited from class graphql.execution.instrumentation.SimplePerformantInstrumentation
INSTANCE
-
-
Constructor Summary
Constructors Constructor Description TracingInstrumentation()
TracingInstrumentation(TracingInstrumentation.Options options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentationContext<java.lang.Object>
beginFieldFetch(InstrumentationFieldFetchParameters parameters, InstrumentationState rawState)
This is called just before a fieldDataFetcher
is invoked.InstrumentationContext<Document>
beginParse(InstrumentationExecutionParameters parameters, InstrumentationState rawState)
This is called just before a query is parsed.InstrumentationContext<java.util.List<ValidationError>>
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 java.util.concurrent.CompletableFuture<ExecutionResult>
instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters, InstrumentationState rawState)
This is called to allow instrumentation to instrument the execution result in some way-
Methods 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, instrumentDataFetcher, instrumentDataFetcher, instrumentDocumentAndVariables, instrumentDocumentAndVariables, instrumentExecutionContext, instrumentExecutionContext, instrumentExecutionInput, instrumentExecutionInput, instrumentExecutionResult, instrumentSchema, instrumentSchema
-
-
-
-
Constructor Detail
-
TracingInstrumentation
public TracingInstrumentation()
-
TracingInstrumentation
public TracingInstrumentation(TracingInstrumentation.Options options)
-
-
Method Detail
-
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 java.util.concurrent.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<java.lang.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<java.util.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)
-
-