Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f22935d

Browse filesBrowse files
authored
Merge pull request #871 from prometheus/beorn7/doc
Document implications of negative observations
2 parents 11aba26 + f34145a commit f22935d
Copy full SHA for f22935d

File tree

Expand file treeCollapse file tree

2 files changed

+12
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-2
lines changed
Open diff view settings
Collapse file

‎prometheus/histogram.go‎

Copy file name to clipboardExpand all lines: prometheus/histogram.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ type Histogram interface {
4747
Metric
4848
Collector
4949

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

Collapse file

‎prometheus/summary.go‎

Copy file name to clipboardExpand all lines: prometheus/summary.go
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ type Summary interface {
5555
Metric
5656
Collector
5757

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.