Files
floci/docs
Priamo Germosen 979d576684 feat(cloudwatch): query explicit-bucket histograms in PromQL (#10039)
The guide's "How CloudWatch stores histogram metrics" says CloudWatch
converts an explicit-bucket histogram to an exponential one at
ingestion, keeping the count and sum exactly and placing each source
bucket's count in the exponential buckets that cover its range,
weighted by how its density compares with its neighbors' rather than
spread evenly. The guide does not give the algorithm, so Floci's is
its own.

A delta data point's bucket has its density run linearly between edge
densities averaged with each neighbor, and its unbounded buckets reach
its min and max. Any other data point, a cumulative one among them,
has its buckets spread evenly and its min and max unread: the guide's
"Querying histogram metrics" reads a cumulative histogram's growth with
rate, which takes a falling bucket for a counter reset, and a bucket
weighted by its neighbors, or reaching a maximum, gives up part of its
range as they grow. Without a min the lowest bucket reaches down to
zero as histogram_quantile assumes of a classic histogram, without a
max the highest is held just above its bound, a bucket that reaches
zero becomes the zero bucket, and the schema is the finest at most 8
that holds the buckets in 160, the OpenTelemetry SDK default. The
layout depends on the bounds, never the counts, so a cumulative series
with fixed bounds keeps it, and lengths are halved before they are
subtracted, so bounds far apart keep finite counts.

Explicit-bucket series are labelled __type__="histogram" and
__temporality__ as exponential ones are, sharing one reader. Summaries
still carry no sample: the guide lists gauge, sum, histogram and
exponential histogram as the metric types it stores.

Part of #7030.
2026-12-02 23:36:30 -04:00
..
2026-03-15 17:43:56 -05:00