@PublicApi public class TracingInstrumentation extends java.lang.Object implements Instrumentation
Instrumentation implementation uses TracingSupport to
capture tracing information and puts it into the ExecutionResult| Constructor and Description |
|---|
TracingInstrumentation() |
| Modifier and Type | Method and Description |
|---|---|
InstrumentationContext<ExecutionResult> |
beginDataFetch(InstrumentationDataFetchParameters parameters)
This is called just before the data fetching stage is started, waits for all data to be completed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<ExecutionResult> |
beginExecution(InstrumentationExecutionParameters parameters)
This is called just before a query is executed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.util.concurrent.CompletableFuture<ExecutionResult>> |
beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
This is called each time the
ExecutionStrategy is invoked and when the
CompletableFuture has been dispatched for the query fields the
InstrumentationContext.onEnd(Object, Throwable)
is called. |
InstrumentationContext<ExecutionResult> |
beginField(InstrumentationFieldParameters parameters)
This is called just before a field is resolved and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.lang.Object> |
beginFieldFetch(InstrumentationFieldFetchParameters parameters)
This is called just before a field
DataFetcher is invoked and when this step finishes the InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<Document> |
beginParse(InstrumentationExecutionParameters parameters)
This is called just before a query is parsed and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationContext<java.util.List<ValidationError>> |
beginValidation(InstrumentationValidationParameters parameters)
This is called just before the parsed query Document is validated and when this step finishes the
InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished. |
InstrumentationState |
createState()
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
|
java.util.concurrent.CompletableFuture<ExecutionResult> |
instrumentExecutionResult(ExecutionResult executionResult,
InstrumentationExecutionParameters parameters)
This is called to allow instrumentation to instrument the execution result in some way
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeginCompleteField, beginCompleteFieldList, beginDataFetchDispatch, beginFields, instrumentDataFetcher, instrumentExecutionContext, instrumentExecutionInput, instrumentSchemapublic InstrumentationState createState()
InstrumentationcreateState in interface Instrumentationpublic java.util.concurrent.CompletableFuture<ExecutionResult> instrumentExecutionResult(ExecutionResult executionResult, InstrumentationExecutionParameters parameters)
InstrumentationinstrumentExecutionResult in interface InstrumentationexecutionResult - CompletableFuture of the result to instrumentparameters - the parameters to this steppublic InstrumentationContext<java.lang.Object> beginFieldFetch(InstrumentationFieldFetchParameters parameters)
InstrumentationDataFetcher is invoked and when this step finishes the InstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginFieldFetch in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginExecution(InstrumentationExecutionParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginExecution in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<Document> beginParse(InstrumentationExecutionParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginParse in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<java.util.List<ValidationError>> beginValidation(InstrumentationValidationParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginValidation in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<java.util.concurrent.CompletableFuture<ExecutionResult>> beginExecutionStrategy(InstrumentationExecutionStrategyParameters parameters)
InstrumentationExecutionStrategy is invoked and when the
CompletableFuture has been dispatched for the query fields the
InstrumentationContext.onEnd(Object, Throwable)
is called.
Note because the execution strategy execution is asynchronous, the query data is not guaranteed to be
completed when this step finishes. It is however a chance to dispatch side effects that might cause
asynchronous data fetching code to actually run or attach CompletableFuture handlers onto the result
via Instrumentation.beginExecutionStrategy in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginDataFetch(InstrumentationDataFetchParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginDataFetch in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step endspublic InstrumentationContext<ExecutionResult> beginField(InstrumentationFieldParameters parameters)
InstrumentationInstrumentationContext.onEnd(Object, Throwable)
will be called indicating that the step has finished.beginField in interface Instrumentationparameters - the parameters to this stepInstrumentationContext object that will be called back when the step ends