From 0da32651340af3304864c3d04281029320ae9ab1 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Sun, 19 Jun 2022 19:10:29 +0200 Subject: [PATCH] Explain Span layout better Signed-off-by: beorn7 --- io/prometheus/client/metrics.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/io/prometheus/client/metrics.proto b/io/prometheus/client/metrics.proto index a198d3c..21a6955 100644 --- a/io/prometheus/client/metrics.proto +++ b/io/prometheus/client/metrics.proto @@ -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.