Class TracingInstrumentation
- java.lang.Object
-
- graphql.execution.instrumentation.SimplePerformantInstrumentation
-
- graphql.execution.instrumentation.tracing.TracingInstrumentation
-
- All Implemented Interfaces:
Instrumentation
@PublicApi public class TracingInstrumentation extends SimplePerformantInstrumentation
ThisInstrumentationimplementation usesTracingSupportto capture tracing information and puts it into theExecutionResult
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTracingInstrumentation.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 fieldDataFetcheris 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 InstrumentationStatecreateState(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:InstrumentationThis 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:
createStatein interfaceInstrumentation- Overrides:
createStatein 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: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.createState(InstrumentationCreateStateParameters)- Returns:
- a new execution result completable future
-
beginFieldFetch
public InstrumentationContext<java.lang.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.createState(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.createState(InstrumentationCreateStateParameters)- Returns:
- a nullable
InstrumentationContextobject 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: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.createState(InstrumentationCreateStateParameters)- Returns:
- a nullable
InstrumentationContextobject that will be called back when the step ends (assuming it's not null)
-
-