Package io.opencensus.metrics.export
Enum MetricDescriptor.Type
- java.lang.Object
-
- java.lang.Enum<MetricDescriptor.Type>
-
- io.opencensus.metrics.export.MetricDescriptor.Type
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MetricDescriptor.Type>
- Enclosing class:
- MetricDescriptor
public static enum MetricDescriptor.Type extends java.lang.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 Summary
Enum Constants Enum Constant Description CUMULATIVE_DISTRIBUTION
An cumulative measurement of a distribution value.CUMULATIVE_DOUBLE
An cumulative measurement of a double value.CUMULATIVE_INT64
An cumulative measurement of an int64 value.GAUGE_DISTRIBUTION
An instantaneous measurement of a distribution value.GAUGE_DOUBLE
An instantaneous measurement of a double value.GAUGE_INT64
An instantaneous measurement of an int64 value.SUMMARY
Some frameworks implemented DISTRIBUTION as a summary of observations (usually things like request durations and response sizes).
-
Constructor Summary
Constructors Modifier Constructor Description private
Type()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MetricDescriptor.Type
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MetricDescriptor.Type[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
-
-
Method Detail
-
values
public static MetricDescriptor.Type[] 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 (MetricDescriptor.Type c : MetricDescriptor.Type.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MetricDescriptor.Type 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
-
-