Class AsyncMetricEntityState

java.lang.Object
com.linkedin.venice.stats.metrics.AsyncMetricEntityState
Direct Known Subclasses:
AsyncMetricEntityStateBase, MetricEntityState

public abstract class AsyncMetricEntityState extends Object
Abstract operational state of an Async metric which 1. is extended by MetricEntityState to provide the record() functionality for non async metrics 2. should be extended by different AsyncMetricEntityStates like AsyncMetricEntityStateBase to pre-create/cache the Attributes for different number/type of dimensions. check out the classes extending this for more details.
This abstract class holds:
1. Whether otel is enabled or not
2. A MetricEntity
3. One OpenTelemetry (Otel) Instrument
4. Zero or one (out of zero for new metrics or more for existing metrics) Tehuti sensors for this Otel Metric.
One Otel instrument can cover multiple Tehuti sensors through the use of dimensions. Ideally, this class should represent a one-to-many mapping between an Otel instrument and Tehuti sensors. However, to simplify lookup during runtime, this class holds one Otel instrument and one Tehuti sensor. If an Otel instrument corresponds to multiple Tehuti sensors, there will be multiple AsyncMetricEntityState objects, each containing the same Otel instrument but different Tehuti sensors.