Package com.google.api.gax.tracing
Interface ApiTracerFactory
- All Known Implementing Classes:
BaseApiTracerFactory,GoldenSignalsMetricsTracerFactory,MetricsTracerFactory,OpencensusTracerFactory,SpanTracerFactory
A factory to create new instances of
ApiTracers.
In general a single instance of an ApiTracer will correspond to a single logical
operation.
For internal use only. google-cloud-java libraries should extend BaseApiTracerFactory.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault ApiTracerContextdefault ApiTracernewTracer(ApiTracer parent, ApiTracerContext tracerContext) Create a newApiTracerthat will be a child of the current context.newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType) Create a newApiTracerthat will be a child of the current context.default ApiTracerFactorywithContext(ApiTracerContext context) Returns a newApiTracerFactorythat will use the provided context to infer attributes for all tracers created by the factory.
-
Method Details
-
newTracer
ApiTracer newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType) Create a newApiTracerthat will be a child of the current context.- Parameters:
parent- the parent of this tracerspanName- the name of the new spanoperationType- the type of operation that the tracer will trace
-
newTracer
Create a newApiTracerthat will be a child of the current context.- Parameters:
parent- the parent of this tracertracerContext- the method-definition-specific tracer context
-
getApiTracerContext
- Returns:
- the
ApiTracerContextfor this factory
-
withContext
Returns a newApiTracerFactorythat will use the provided context to infer attributes for all tracers created by the factory.- Parameters:
context- anApiTracerContextobject containing information to construct attributes
-