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

Refine descriptions of Histogram+Summary for explicit OpenMetrics compat #302

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Full list of differences found in [this compare.](https://github.com/open-teleme

* Remove if no changes for this section before release.

### Changed
### Changed: Metrics

* Remove if no changes for this section before release.
* :stop_sign: [DATA MODEL CHANGE] Histogram/Summary sums must be monotonic counters of events (#302)

### Added

Expand Down
12 changes: 10 additions & 2 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ message IntHistogram {
AggregationTemporality aggregation_temporality = 2;
}

// Histogram represents the type of a metric that is calculated by aggregating as a
// Histogram of all reported double measurements over a time interval.
// Histogram represents the type of a metric that is calculated by aggregating
// as a Histogram of all reported double measurements over a time interval.
message Histogram {
repeated HistogramDataPoint data_points = 1;

Expand Down Expand Up @@ -526,6 +526,12 @@ message HistogramDataPoint {
// sum of the values in the population. If count is zero then this field
// must be zero. This value must be equal to the sum of the "sum" fields in
// buckets if a histogram is provided.
//
// Note: Sum should only be filled out when measuring non-negative discrete
// events, and is assumed to be monotonic over the values of these events.
// Negative events *can* be recorded, but sum should not be filled out when
// doing so. This is specifically to enforce compatibility w/ OpenMetrics,
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
// see: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#histogram
double sum = 5;

// bucket_counts is an optional field contains the count values of histogram
Expand Down Expand Up @@ -609,6 +615,8 @@ message SummaryDataPoint {
double quantile = 1;

// The value at the given quantile of a distribution.
//
// Quantile values must NOT be negative.
double value = 2;
}

Expand Down