Skip to content

Commit

Permalink
Add Monotonic Types (open-telemetry#145)
Browse files Browse the repository at this point in the history
* Add Monotonic refinement

Knowing the monotonicity of metric data enables receivers to implement
certain algorithms to calculate the rate of change of the data. As such,
this is an important quality to describe and is added to the
`MetricDescriptor`.

*Note on English*: NONDECREASING is used to describe values that either
increase or remain constant over time. The English term "increasing" is
not used as it does not encompass values that remain constant over time.

A comment is added to identify the omission of NONINCREASING and
information on how to notify it is needed should that arise in the
future.

* Monotonic in type

Instead of including a monotonic refinement, specify where applicable to
the type.

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
MrAlias and bogdandrutu authored Jun 2, 2020
1 parent 9fa4564 commit b546885
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 83 deletions.
169 changes: 92 additions & 77 deletions gen/go/metrics/v1/metrics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 17 additions & 6 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -123,28 +123,39 @@ message MetricDescriptor {
// INVALID_TYPE is the default Type, it MUST not be used.
INVALID_TYPE = 0;

// INT64 values are represents as signed 64-bit integers.
// INT64 values are signed 64-bit integers.
//
// A Metric of this Type MUST store its values as Int64DataPoint.
INT64 = 1;

// DOUBLE values are represents as double-precision floating-point
// numbers.
// MONOTONIC_INT64 values are monotonically increasing signed 64-bit
// integers.
//
// A Metric of this Type MUST store its values as Int64DataPoint.
MONOTONIC_INT64 = 2;

// DOUBLE values are double-precision floating-point numbers.
//
// A Metric of this Type MUST store its values as DoubleDataPoint.
DOUBLE = 3;

// MONOTONIC_DOUBLE values are monotonically increasing double-precision
// floating-point numbers.
//
// A Metric of this Type MUST store its values as DoubleDataPoint.
DOUBLE = 2;
MONOTONIC_DOUBLE = 4;

// Histogram measurement.
// Corresponding values are stored in HistogramDataPoint.
HISTOGRAM = 3;
HISTOGRAM = 5;

// Summary value. Some frameworks implemented Histograms 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 percentiles over a sliding time
// window.
// Corresponding values are stored in SummaryDataPoint.
SUMMARY = 4;
SUMMARY = 6;
}

// type is the type of values this metric has.
Expand Down

0 comments on commit b546885

Please sign in to comment.