diff --git a/prometheus/histogram.go b/prometheus/histogram.go index e43898c63..727bec42a 100644 --- a/prometheus/histogram.go +++ b/prometheus/histogram.go @@ -1886,16 +1886,16 @@ func validateExemplars(exemplars []*dto.Exemplar) error { // // zeroBucket counts all (positive and negative) // observations in the zero bucket (with an absolute value less or equal -// the current threshold) +// the current threshold). // positiveBuckets and negativeBuckets are separate maps for negative and positive // observations. The map's value is an int64, counting observations in // that bucket. The map's key is the // index of the bucket according to the used -// Schema. Index 0 is for an upper bound of 1. +// Schema. Index 0 is for an upper bound of 1 in positive buckets and for a lower bound of -1 in negative buckets. // NewConstNativeHistogram returns an error if -// 1.the length of labelValues is not consistent with the variable labels in Desc or if Desc is invalid. -// 2.the schema passed is not between 8 and -4 -// 3.the sum of counts in the bucket do not equal count +// - the length of labelValues is not consistent with the variable labels in Desc or if Desc is invalid. +// - the schema passed is not between 8 and -4 +// - the sum of counts in the bucket do not equal count when sum is not Nan func NewConstNativeHistogram( desc *Desc, count uint64,