Skip to content

Commit

Permalink
Merge pull request #871 from prometheus/beorn7/doc
Browse files Browse the repository at this point in the history
Document implications of negative observations
  • Loading branch information
beorn7 committed Jun 1, 2021
2 parents 11aba26 + f34145a commit f22935d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion prometheus/histogram.go
Expand Up @@ -47,7 +47,12 @@ type Histogram interface {
Metric
Collector

// Observe adds a single observation to the histogram.
// Observe adds a single observation to the histogram. Observations are
// usually positive or zero. Negative observations are accepted but
// prevent current versions of Prometheus from properly detecting
// counter resets in the sum of observations. See
// https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations
// for details.
Observe(float64)
}

Expand Down
7 changes: 6 additions & 1 deletion prometheus/summary.go
Expand Up @@ -55,7 +55,12 @@ type Summary interface {
Metric
Collector

// Observe adds a single observation to the summary.
// Observe adds a single observation to the summary. Observations are
// usually positive or zero. Negative observations are accepted but
// prevent current versions of Prometheus from properly detecting
// counter resets in the sum of observations. See
// https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations
// for details.
Observe(float64)
}

Expand Down

0 comments on commit f22935d

Please sign in to comment.