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 Summary
Modifier and TypeMethodDescriptionDimension name: Returns theVeniceMetricsDimensionsfor the enum.default StringDimension value: Returns the dimension value for each enum instance.
-
Method Details
-
getDimensionName
VeniceMetricsDimensions getDimensionName()Dimension name: Returns theVeniceMetricsDimensionsfor 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
Dimension value: Returns the dimension value for each enum instance. Default implementation returnsname().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).
-