Package com.linkedin.venice.stats
Enum VeniceOpenTelemetryMetricNamingFormat
- java.lang.Object
-
- java.lang.Enum<VeniceOpenTelemetryMetricNamingFormat>
-
- com.linkedin.venice.stats.VeniceOpenTelemetryMetricNamingFormat
-
- All Implemented Interfaces:
VeniceEnumValue
,java.io.Serializable
,java.lang.Comparable<VeniceOpenTelemetryMetricNamingFormat>
public enum VeniceOpenTelemetryMetricNamingFormat extends java.lang.Enum<VeniceOpenTelemetryMetricNamingFormat> implements VeniceEnumValue
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CAMEL_CASE
Alternate format for attribute names.PASCAL_CASE
SNAKE_CASE
Default format if not configured, names are defined as per this.
-
Field Summary
Fields Modifier and Type Field Description static int
SIZE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
static java.lang.String
transformMetricName(java.lang.String input, VeniceOpenTelemetryMetricNamingFormat metricFormat)
static void
validateMetricName(java.lang.String name)
validate whether the input name is defined as a validSNAKE_CASE
static VeniceOpenTelemetryMetricNamingFormat
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static VeniceOpenTelemetryMetricNamingFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SNAKE_CASE
public static final VeniceOpenTelemetryMetricNamingFormat 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
public static final VeniceOpenTelemetryMetricNamingFormat 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
public static final VeniceOpenTelemetryMetricNamingFormat PASCAL_CASE
-
-
Method Detail
-
values
public static VeniceOpenTelemetryMetricNamingFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VeniceOpenTelemetryMetricNamingFormat c : VeniceOpenTelemetryMetricNamingFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VeniceOpenTelemetryMetricNamingFormat valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
- Specified by:
getValue
in interfaceVeniceEnumValue
-
validateMetricName
public static void validateMetricName(java.lang.String name)
validate whether the input name is defined as a validSNAKE_CASE
-
transformMetricName
public static java.lang.String transformMetricName(java.lang.String input, VeniceOpenTelemetryMetricNamingFormat metricFormat)
-
-