prometheus/storage/remote
zenador 69edd8709b
Add warnings (and annotations) to PromQL query results (#12152)
Return annotations (warnings and infos) from PromQL queries

This generalizes the warnings we have already used before (but only for problems with remote read) as "annotations".

Annotations can be warnings or infos (the latter could be false positives). We do not treat them different in the API for now and return them all as "warnings". It would be easy to distinguish them and return infos separately, should that appear useful in the future.

The new annotations are then used to create a lot of warnings or infos during PromQL evaluations. Partially these are things we have wanted for a long time (e.g. inform the user that they have applied `rate` to a metric that doesn't look like a counter), but the new native histograms have created even more needs for those annotations (e.g. if a query tries to aggregate float numbers with histograms).

The annotations added here are not yet complete. A prominent example would be a warning about a range too short for a rate calculation. But such a warnings is more tricky to create with good fidelity and we will tackle it later.

Another TODO is to take annotations into account when evaluating recording rules.

---------

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-09-14 18:57:31 +02:00
..
azuread Add Azure AD package for remote write (#11944) 2023-06-01 15:20:10 -06:00
otlptranslator Unit tests for native histograms (#12668) 2023-08-25 23:35:42 +02:00
chunked.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
client.go Add Azure AD package for remote write (#11944) 2023-06-01 15:20:10 -06:00
client_test.go remote: Convert to RecoverableError using errors.As (#12103) 2023-03-08 13:58:09 -07:00
codec.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
codec_test.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
ewma.go style: Replace `else if` cascades with `switch` 2023-04-19 17:22:31 +02:00
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
metadata_watcher_test.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
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 Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
read_handler.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
read_handler_test.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00
read_test.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
storage.go Add context argument to Querier.Select (#12660) 2023-09-12 12:37:38 +02:00
storage_test.go Update package storage/remote tests for new labels.Labels type 2022-12-19 15:22:09 +00:00
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