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 Details

    • 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 Details

    • values

      public static MetricCategory[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
    • fromString

      public static MetricCategory fromString(String value)
      Create a MetricCategory from the given String value. This method is case insensitive.
      Parameters:
      value - the value to create the MetricCategory from
      Returns:
      A MetricCategory if the given value matches one of the enum values. Otherwise throws IllegalArgumentException