Skip to content

Commit

Permalink
Explain Span layout better
Browse files Browse the repository at this point in the history
Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 committed Jun 19, 2022
1 parent 8171e83 commit 0da3265
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions io/prometheus/client/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ message Bucket {
}

message SparseBuckets {
// A Span is a given number of consecutive buckets at a given
// offset. Logically, it would be more straightforward to include
// the bucket counts in the Span. However, the protobuf
// representation is more compact in the way the data is structured
// here (with all the buckets in a single array separate from the
// Spans).
message Span {
optional sint32 offset = 1; // Gap to previous span, or starting point for 1st span (which can be negative).
optional uint32 length = 2; // Length of consecutive buckets.
Expand Down

0 comments on commit 0da3265

Please sign in to comment.