Package com.google.api.gax.tracing
Class AppCentricTracer
java.lang.Object
com.google.api.gax.tracing.AppCentricTracer
- All Implemented Interfaces:
ApiTracer
An implementation of
ApiTracer that uses a TraceManager to record traces. This
implementation is agnostic to the specific TraceManager in order to allow extensions that
interact with other backends.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.api.gax.tracing.ApiTracer
ApiTracer.Scope -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAppCentricTracer(TraceManager traceManager, ApiTracerContext apiTracerContext, String attemptSpanName) Creates a new instance ofAppCentricTracer. -
Method Summary
Modifier and TypeMethodDescriptionvoidattemptStarted(Object request, int attemptNumber) Adds an annotation that an attempt is about to start with additional information from the request.voidAdds an annotation that the attempt succeeded.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.api.gax.tracing.ApiTracer
attemptCancelled, attemptFailed, attemptFailedDuration, attemptFailedRetriesExhausted, attemptPermanentFailure, attemptStarted, batchRequestSent, connectionSelected, inScope, lroStartFailed, lroStartSucceeded, operationCancelled, operationFailed, operationSucceeded, requestSent, responseReceived
-
Field Details
-
LANGUAGE_ATTRIBUTE
- See Also:
-
DEFAULT_LANGUAGE
- See Also:
-
-
Constructor Details
-
AppCentricTracer
public AppCentricTracer(TraceManager traceManager, ApiTracerContext apiTracerContext, String attemptSpanName) Creates a new instance ofAppCentricTracer.- Parameters:
traceManager- theTraceManagerto use for recording spansattemptSpanName- the name of the individual attempt spans
-
-
Method Details
-
attemptStarted
Description copied from interface:ApiTracerAdds an annotation that an attempt is about to start with additional information from the request. In general this should occur at the very start of the operation. The attemptNumber is zero based. So the initial attempt will be 0.- Specified by:
attemptStartedin interfaceApiTracer- Parameters:
request- request of this attempt.attemptNumber- the zero based sequential attempt number.
-
attemptSucceeded
public void attemptSucceeded()Description copied from interface:ApiTracerAdds an annotation that the attempt succeeded.- Specified by:
attemptSucceededin interfaceApiTracer
-