Skip to content

Commit

Permalink
histogram: Add a doc comment about when to add a no-op span
Browse files Browse the repository at this point in the history
See prometheus/client_golang#1127 for details.

Signed-off-by: beorn7 <beorn@grafana.com>
  • Loading branch information
beorn7 committed Jul 20, 2023
1 parent 95a0733 commit 2a367b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/metrics.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions io/prometheus/client/metrics.proto
Expand Up @@ -98,6 +98,9 @@ message Histogram {
repeated double negative_count = 11; // Absolute count of each bucket.

// Positive buckets for the native histogram.
// Use a no-op span (offset 0, length 0) for a native histogram without any
// observations yet and with a zero_threshold of 0. Otherwise, it would be
// indistinguishable from a classic histogram.
repeated BucketSpan positive_span = 12;
// Use either "positive_delta" or "positive_count", the former for
// regular histograms with integer counts, the latter for float
Expand Down

0 comments on commit 2a367b9

Please sign in to comment.