Enum MetricLevel

  • All Implemented Interfaces:
    Serializable, Comparable<MetricLevel>

    public enum MetricLevel
    extends Enum<MetricLevel>
    The MetricLevel associated with a SdkMetric, similar to log levels, defines the 'scenario' in which the metric is useful. This makes it easy to reduce the cost of metric publishing (e.g. by setting it to INFO), and then increase it when additional data level is needed for debugging purposes (e.g. by setting it to TRACE.
    • Enum Constant Detail

      • TRACE

        public static final MetricLevel TRACE
        The metric level that includes every other metric level, as well as some highly-technical metrics that may only be useful in very specific performance or failure scenarios.
      • INFO

        public static final MetricLevel INFO
        The "default" metric level that includes metrics that are useful for identifying why errors or performance issues are occurring within the SDK. This excludes technical metrics that are only useful in very specific performance or failure scenarios.
      • ERROR

        public static final MetricLevel ERROR
        Includes metrics that report when API call errors are occurring within the SDK. This does not include all of the information that may be generally useful when debugging why errors are occurring (e.g. latency).
    • Method Detail

      • values

        public static MetricLevel[] 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 (MetricLevel c : MetricLevel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MetricLevel 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
      • includesLevel

        public boolean includesLevel​(MetricLevel level)