Class MetricsTracerFactory (2.43.0)

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.

Inheritance

java.lang.Object > MetricsTracerFactory

Implements

ApiTracerFactory

Constructors

MetricsTracerFactory(MetricsRecorder metricsRecorder)

public MetricsTracerFactory(MetricsRecorder metricsRecorder)
Parameter
NameDescription
metricsRecorderMetricsRecorder

Fields

metricsRecorder

protected MetricsRecorder metricsRecorder
Field Value
TypeDescription
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
NameDescription
parentApiTracer
spanNameSpanName
operationTypeApiTracerFactory.OperationType
Returns
TypeDescription
ApiTracer