Class MetricEntityStateGeneric

java.lang.Object
com.linkedin.venice.stats.metrics.MetricEntityState
com.linkedin.venice.stats.metrics.MetricEntityStateGeneric

public class MetricEntityStateGeneric extends MetricEntityState
Provides a flexible, generic, and non-caching implementation of MetricEntityState for one or more dynamic dimensions, where the dimensions can be enums or arbitrary strings and do not need to be cached: This implementation should be used only in certain control-path components (such as controllers) where: 1. Performance constraints are lenient, and metric recording is infrequent. 2. The metric entity requires an arbitrary number of dynamic dimensions without predefined enums: For example, store name, cluster name, etc. Do not use this for cases with 0 dynamic dimensions and use MetricEntityStateBase instead. This approach also helps reduce code complexity and avoids the proliferation of specialized subclasses (like MetricEntityStateOneEnum) for different dynamic dimension combinations when attribute caching is not necessary. Compared to enum-based subclasses, this class provides less compile-time type safety, as it does not enforce dynamic dimensions to be enums and does not require explicit dimension types during instantiation.