Skip to content

Commit 58a8ca4

Browse files
committed
examples: Adjust doc comment for native histograms
Signed-off-by: beorn7 <beorn@grafana.com>
1 parent 4e71e6f commit 58a8ca4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

examples/random/main.go

+11-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,17 @@ func main() {
5353
},
5454
[]string{"service"},
5555
)
56-
// The same as above, but now as a histogram, and only for the normal
57-
// distribution. The buckets are targeted to the parameters of the
58-
// normal distribution, with 20 buckets centered on the mean, each
59-
// half-sigma wide.
56+
// The same as above, but now as a histogram, and only for the
57+
// normal distribution. The histogram features both conventional
58+
// buckets as well as sparse buckets, the latter needed for the
59+
// experimental native histograms (ingested by a Prometheus
60+
// server v2.40 with the corresponding feature flag
61+
// enabled). The conventional buckets are targeted to the
62+
// parameters of the normal distribution, with 20 buckets
63+
// centered on the mean, each half-sigma wide. The sparse
64+
// buckets are always centered on zero, with a growth factor of
65+
// one bucket to the text of (at most) 1.1. (The precise factor
66+
// is 2^2^-3 = 1.0905077...)
6067
rpcDurationsHistogram = prometheus.NewHistogram(prometheus.HistogramOpts{
6168
Name: "rpc_durations_histogram_seconds",
6269
Help: "RPC latency distributions.",

0 commit comments

Comments
 (0)