Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Monotonic Types #145

Merged
merged 4 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
186 changes: 121 additions & 65 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.

32 changes: 31 additions & 1 deletion opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,39 @@ message MetricDescriptor {
// temporality is the Temporality of values this metric has.
Temporality temporality = 5;

// Monotonic describes the relationship between successively reported
// values of a metric (i.e. values of a metric with the same labels are
// non-decreasing).
//
// This refinement of metric values can be useful in understanding how to
// deal with discontinuities in the data (i.e. calculating rates of the
// data without introducing artifacts from a reset).
//
// This refinement is not coupled to any of the other metric qualities.
// For example, a CUMULATIVE metric is not implicitly NONDECREASING. This
// decoupling is needed in order for this protocol to agonistically
// transport metrics. However, it is important to note this diverges from
// some other metric systems (e.g Prometheus).
enum Monotonic {
// UNSPECIFIED_MONOTONIC is the default, and means the monotonic nature
// of the metric values is unknown.
UNSPECIFIED_MONOTONIC = 0;

// NONDECREASING means all the successive metric values increase or
// remain constant.
NONDECREASING = 1;

// NONINCREASING is currently omitted due to the lack of a known
// use-case. If you have a fitting use-case please open an issue to add
// this Monotonic value.
}

// monotonic describes the Monotonic refinement of values this metric has.
Monotonic monotonic = 6;

// The set of labels associated with the metric descriptor. Labels in this list apply to
// all data points.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 6;
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 7;
}

// Int64DataPoint is a single data point in a timeseries that describes the time-varying
Expand Down