Enum MetricDescriptor.Type

java.lang.Object
java.lang.Enum<MetricDescriptor.Type>
io.opencensus.metrics.export.MetricDescriptor.Type
All Implemented Interfaces:
Serializable, Comparable<MetricDescriptor.Type>
Enclosing class:
MetricDescriptor

public static enum MetricDescriptor.Type extends Enum<MetricDescriptor.Type>
The kind of metric. It describes how the data is reported.

A gauge is an instantaneous measurement of a value.

A cumulative measurement is a value accumulated over a time interval. In a time series, cumulative measurements should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points.

Since:
0.17
  • Enum Constant Details

    • GAUGE_INT64

      public static final MetricDescriptor.Type GAUGE_INT64
      An instantaneous measurement of an int64 value.
      Since:
      0.17
    • GAUGE_DOUBLE

      public static final MetricDescriptor.Type GAUGE_DOUBLE
      An instantaneous measurement of a double value.
      Since:
      0.17
    • GAUGE_DISTRIBUTION

      public static final MetricDescriptor.Type GAUGE_DISTRIBUTION
      An instantaneous measurement of a distribution value. The count and sum can go both up and down. Used in scenarios like a snapshot of time the current items in a queue have spent there.
      Since:
      0.17
    • CUMULATIVE_INT64

      public static final MetricDescriptor.Type CUMULATIVE_INT64
      An cumulative measurement of an int64 value.
      Since:
      0.17
    • CUMULATIVE_DOUBLE

      public static final MetricDescriptor.Type CUMULATIVE_DOUBLE
      An cumulative measurement of a double value.
      Since:
      0.17
    • CUMULATIVE_DISTRIBUTION

      public static final MetricDescriptor.Type CUMULATIVE_DISTRIBUTION
      An cumulative measurement of a distribution value. The count and sum can only go up, if resets then the start_time should also be reset.
      Since:
      0.17
    • SUMMARY

      public static final MetricDescriptor.Type SUMMARY
      Some frameworks implemented DISTRIBUTION as a summary of observations (usually things like request durations and response sizes). While it also provides a total count of observations and a sum of all observed values, it calculates configurable quantiles over a sliding time window.

      This is not recommended, since it cannot be aggregated.

      Since:
      0.17
  • Constructor Details

    • Type

      private Type()
  • Method Details

    • values

      public static MetricDescriptor.Type[] 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 MetricDescriptor.Type 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