prometheus/storage/remote
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
..
azuread Add Azure AD package for remote write (#11944) 2023-06-01 15:20:10 -06:00
otlptranslator Add OTLP Ingestion endpoint (#12571) 2023-07-28 12:35:28 +02:00
chunked.go
chunked_test.go
client.go Add Azure AD package for remote write (#11944) 2023-06-01 15:20:10 -06:00
client_test.go
codec.go Add OTLP Ingestion endpoint (#12571) 2023-07-28 12:35:28 +02:00
codec_test.go Perform integer/float histogram type checking on conversions, and use a consistent method for determining integer vs float histogram 2023-04-22 02:27:15 +08:00
ewma.go style: Replace else if cascades with switch 2023-04-19 17:22:31 +02:00
intern.go
intern_test.go
max_timestamp.go
metadata_watcher.go
metadata_watcher_test.go
queue_manager.go remote-write: add http.resend_count tracing attribute 2023-08-11 16:20:12 +00:00
queue_manager_test.go Perform integer/float histogram type checking on conversions, and use a consistent method for determining integer vs float histogram 2023-04-22 02:27:15 +08:00
read.go
read_handler.go Replace sort.Slice with faster slices.SortFunc 2023-07-02 22:17:08 +00:00
read_handler_test.go tsdb: Fix histogram validation 2023-08-22 23:04:01 +02:00
read_test.go
storage.go [tsdb] re-implement WAL watcher to read via a "notification" channel (#11949) 2023-05-15 12:31:49 -07:00
storage_test.go
write.go Add Azure AD package for remote write (#11944) 2023-06-01 15:20:10 -06:00
write_handler.go Add OTLP Ingestion endpoint (#12571) 2023-07-28 12:35:28 +02:00
write_handler_test.go Merge pull request #11688 from damnever/fix/datamodelvalidation-remotewriteapi 2023-07-04 13:52:02 +02:00
write_test.go Add OTLP Ingestion endpoint (#12571) 2023-07-28 12:35:28 +02:00