Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 9ee1a1e

Browse files
authored
Make MetricDescriptor.Type capture the type of the value as well. (#63)
* Make MetricDescriptor.Type capture the type of the value as well. e.g. int64 vs double vs distribution.
1 parent 7961b68 commit 9ee1a1e

1 file changed

Lines changed: 20 additions & 7 deletions

File tree

opencensus/proto/stats/metrics/metrics.proto

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,31 @@ message MetricDescriptor {
6161
string unit = 3;
6262

6363
// The kind of metric. It describes how the data is reported.
64+
//
65+
// A gauge is an instantaneous measurement of a value.
66+
//
67+
// A cumulative measurement is a value accumulated over a time interval. In
68+
// a time series, cumulative measurements should have the same start time and
69+
// increasing end times, until an event resets the cumulative value to zero
70+
// and sets a new start time for the following points.
6471
enum Type {
6572
// Do not use this default value.
6673
UNSPECIFIED = 0;
6774

68-
// An instantaneous measurement of a value.
69-
GAUGE = 1;
75+
// Integer gauge.
76+
GAUGE_INT64 = 1;
77+
78+
// Floating point gauge.
79+
GAUGE_DOUBLE = 2;
80+
81+
// Integer cumulative measurement.
82+
CUMULATIVE_INT64 = 3;
83+
84+
// Floating point cumulative measurement.
85+
CUMULATIVE_DOUBLE = 4;
7086

71-
// A value accumulated over a time interval. Cumulative measurements in a
72-
// time series should have the same start time and increasing end times,
73-
// until an event resets the cumulative value to zero and sets a new
74-
// start time for the following points.
75-
CUMULATIVE = 2;
87+
// Distribution cumulative measurement.
88+
CUMULATIVE_DISTRIBUTION = 5;
7689
}
7790
Type type = 4;
7891

0 commit comments

Comments
 (0)