Interface VeniceDimensionInterface

All Known Implementing Classes:
AdminMessageProcessingComponent, AdminMessageType, ControllerRoute, HttpResponseStatusCodeCategory, HttpResponseStatusEnum, InstanceErrorType, MessageType, RejectionReason, ReplicaState, ReplicaType, RequestFanoutType, RequestRetryAbortReason, RequestRetryType, RequestType, StoreRepushTriggerSource, StreamProgress, VeniceDCREvent, VeniceIngestionDestinationComponent, VeniceIngestionSourceComponent, VenicePushJobStatus, VeniceRegionLocality, VeniceResponseStatusCategory, VeniceSystemStoreType, Version.PushType, VersionRole

public interface VeniceDimensionInterface
Every enum that should be used as a dimension for otel should implement this interface as this mandates the enum to have a dimension name and a dimension value. All such enums should add a test class that extends VeniceDimensionInterfaceTest to test whether all the enum instances of an enum Class have the same dimension name and also validates the dimension values.
  • Method Details

    • getDimensionName

      VeniceMetricsDimensions getDimensionName()
      Dimension name: Returns the VeniceMetricsDimensions for the enum. All the instances of a Enum class should have the same dimension name. Ideally this could have been a static variable/method in the Enum class, but to enforce having this method via this interface, it is made as a non-static method.
    • getDimensionValue

      default String getDimensionValue()
      Dimension value: Returns the dimension value for each enum instance. Default implementation returns name().toLowerCase(), which is the convention for most dimension enums. Override only when the dimension value differs from the lowercase enum constant name (e.g., HTTP status codes, custom string mappings).