Package com.google.api.gax.tracing
Class MetricsTracerFactory
java.lang.Object
com.google.api.gax.tracing.MetricsTracerFactory
- All Implemented Interfaces:
ApiTracerFactory
A
ApiTracerFactory to build instances of MetricsTracer.
This class wraps the MetricsRecorder and pass it to MetricsTracer. It will be
used to record metrics in MetricsTracer.
This class is expected to be initialized once during client initialization.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.api.gax.tracing.ApiTracerFactory
ApiTracerFactory.OperationType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMetricsTracerFactory(MetricsRecorder metricsRecorder) Creates a MetricsTracerFactory with no additional client level attributes.MetricsTracerFactory(MetricsRecorder metricsRecorder, Map<String, String> attributes) Pass in a Map of client level attributes which will be added to every single MetricsTracer created from the ApiTracerFactory. -
Method Summary
-
Field Details
-
metricsRecorder
-
-
Constructor Details
-
MetricsTracerFactory
Creates a MetricsTracerFactory with no additional client level attributes. -
MetricsTracerFactory
Pass in a Map of client level attributes which will be added to every single MetricsTracer created from the ApiTracerFactory.
-
-
Method Details
-
newTracer
public ApiTracer newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType) Description copied from interface:ApiTracerFactoryCreate a newApiTracerthat will be a child of the current context.- Specified by:
newTracerin interfaceApiTracerFactory- Parameters:
parent- the parent of this tracerspanName- the name of the new spanoperationType- the type of operation that the tracer will trace
-