Package software.amazon.awssdk.metrics
Enum MetricCategory
- java.lang.Object
-
- java.lang.Enum<MetricCategory>
-
- software.amazon.awssdk.metrics.MetricCategory
-
- All Implemented Interfaces:
Serializable
,Comparable<MetricCategory>
public enum MetricCategory extends Enum<MetricCategory>
A enum class representing the different types of metric categories in the SDK.A metric can be tagged with multiple categories. Clients can enable/disable metric collection at a
MetricCategory
level.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALL
This is an umbrella category (provided for convenience) that records metrics belonging to every category defined in this enum.CORE
Metrics collected by the core SDK are classified under this category.CUSTOM
Metrics specified by the customer should be classified under this category.HTTP_CLIENT
Metrics collected at the http client level are classified under this category.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetricCategory
fromString(String value)
Create aMetricCategory
from the given String value.String
getValue()
static MetricCategory
valueOf(String name)
Returns the enum constant of this type with the specified name.static MetricCategory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CORE
public static final MetricCategory CORE
Metrics collected by the core SDK are classified under this category.
-
HTTP_CLIENT
public static final MetricCategory HTTP_CLIENT
Metrics collected at the http client level are classified under this category.
-
CUSTOM
public static final MetricCategory CUSTOM
Metrics specified by the customer should be classified under this category.
-
ALL
public static final MetricCategory ALL
This is an umbrella category (provided for convenience) that records metrics belonging to every category defined in this enum. Clients who wish to collect lot of SDK metrics data should use this.Note: Enabling this option along with
MetricLevel.TRACE
is verbose and can be expensive based on the platform the metrics are uploaded to. Please make sure you need all this data before using this category.
-
-
Method Detail
-
values
public static MetricCategory[] 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 (MetricCategory c : MetricCategory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MetricCategory valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public String getValue()
-
fromString
public static MetricCategory fromString(String value)
Create aMetricCategory
from the given String value. This method is case insensitive.- Parameters:
value
- the value to create theMetricCategory
from- Returns:
- A
MetricCategory
if the givenvalue
matches one of the enum values. Otherwise throwsIllegalArgumentException
-
-