public class MetricsTracerFactory implements 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.
Implements
ApiTracerFactoryConstructors
MetricsTracerFactory(MetricsRecorder metricsRecorder)
public MetricsTracerFactory(MetricsRecorder metricsRecorder)
Parameter | |
---|---|
Name | Description |
metricsRecorder | MetricsRecorder |
Fields
metricsRecorder
protected MetricsRecorder metricsRecorder
Field Value | |
---|---|
Type | Description |
MetricsRecorder |
Methods
newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType)
public ApiTracer newTracer(ApiTracer parent, SpanName spanName, ApiTracerFactory.OperationType operationType)
Create a new ApiTracer that will be a child of the current context.
Parameters | |
---|---|
Name | Description |
parent | ApiTracer |
spanName | SpanName |
operationType | ApiTracerFactory.OperationType |
Returns | |
---|---|
Type | Description |
ApiTracer |