Skip to content

Commit

Permalink
For prometheus metrics without sums, leave the sum unset (#2413)
Browse files Browse the repository at this point in the history
* for prometheus metrics without sums, use a sum of 0

* sum is unset instead of 0

Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
dashpole and bogdandrutu committed Mar 22, 2022
1 parent fea4278 commit 7a2d451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specification/metrics/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ Multiple Prometheus histogram metrics MUST be merged together into a single OTLP
* The `le` label on non-suffixed metrics is used to identify and order histogram bucket boundaries. Each Prometheus line produces one bucket count on the resulting histogram. Each value for the `le` label except `+Inf` produces one bucket boundary.
* Lines with `_count` and `_sum` suffixes are used to determine the histogram's count and sum.
* If `_count` is not present, the metric MUST be dropped.
* If `_sum` is not present, it MUST be computed from the buckets.
* If `_sum` is not present, the histogram's sum MUST be unset.

#### Summaries

Expand Down

0 comments on commit 7a2d451

Please sign in to comment.