Package com.linkedin.venice.stats
Enum Class VeniceOpenTelemetryMetricNamingFormat
java.lang.Object
java.lang.Enum<VeniceOpenTelemetryMetricNamingFormat>
com.linkedin.venice.stats.VeniceOpenTelemetryMetricNamingFormat
- All Implemented Interfaces:
VeniceEnumValue
,Serializable
,Comparable<VeniceOpenTelemetryMetricNamingFormat>
,Constable
public enum VeniceOpenTelemetryMetricNamingFormat
extends Enum<VeniceOpenTelemetryMetricNamingFormat>
implements VeniceEnumValue
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAlternate format for attribute names.Default format if not configured, names are defined as per this. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
static String
transformMetricName
(String input, VeniceOpenTelemetryMetricNamingFormat metricFormat) static void
validateMetricName
(String name) validate whether the input name is defined as a validSNAKE_CASE
Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SNAKE_CASE
Default format if not configured, names are defined as per this. should use snake case as per https://opentelemetry.io/docs/specs/semconv/general/attribute-naming/ For example: http.response.status_code -
CAMEL_CASE
Alternate format for attribute names. If configured, defined names in snake_case will be transformed to either one of below formats. camel case: For example, http.response.statusCode pascal case: For example, Http.Response.StatusCode -
PASCAL_CASE
-
-
Field Details
-
SIZE
public static final int SIZE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()- Specified by:
getValue
in interfaceVeniceEnumValue
-
validateMetricName
validate whether the input name is defined as a validSNAKE_CASE
-
transformMetricName
public static String transformMetricName(String input, VeniceOpenTelemetryMetricNamingFormat metricFormat) -
getDefaultFormat
-