Class MetricEntityState

java.lang.Object
com.linkedin.venice.stats.metrics.MetricEntityState
Direct Known Subclasses:
MetricEntityStateBase, MetricEntityStateOneEnum, MetricEntityStateThreeEnums, MetricEntityStateTwoEnums

public abstract class MetricEntityState extends Object
Abstract operational state of a metric which should be extended by different MetricEntityStates 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 MetricEntityState objects, each containing the same Otel instrument but different Tehuti sensors.