prometheus/web
beorn7 aa82fe198f tsdb: Fix histogram validation
So far, `ValidateHistogram` would not detect if the count did not
include the count in the zero bucket. This commit fixes the problem
and updates all the tests that have been undetected offenders so far.

Note that this problem would only ever create false negatives, so we
never falsely rejected to store a histogram because of it.

On the other hand, `ValidateFloatHistogram` has been to strict with
the count being at least as large as the sum of the counts in all the
buckets. Float precision issues could create false positives here, see
products of PromQL evaluations, it's actually quite hard to put an
upper limit no the floating point imprecision. Users could produce the
weirdest expressions, maxing out float precision problems. Therefore,
this commit simply removes that particular check from
`ValidateFloatHistogram`.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-08-22 23:04:01 +02:00
..
api/v1 promql: allow tests to be imported (#12050) 2023-08-18 20:48:59 +02:00
ui scraping: limit detail on dropped targets, to save memory (#12647) 2023-08-14 15:39:25 +01:00
federate.go Replace sort.Sort with faster slices.SortFunc 2023-07-10 09:43:45 +00:00
federate_test.go tsdb: Fix histogram validation 2023-08-22 23:04:01 +02:00
web.go Add OTLP Ingestion endpoint (#12571) 2023-07-28 12:35:28 +02:00
web_test.go Added 'limit' query parameter support to /api/v1/status/tsdb endpoint (#12336) 2023-05-22 14:37:07 +02:00