prometheus/storage/remote
Marc Tudurí 78c5ce3196
Drop old inmemory samples (#13002)
* Drop old inmemory samples

Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Avoid copying timeseries when the feature is disabled

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Run gofmt

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Clarify docs

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Add more logging info

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Remove loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* optimize function and add tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Simplify filter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Update help info from metrics

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use metrics to keep track of drop elements during buildWriteRequest

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* rename var in tests

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* pass time.Now as parameter

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Change buildwriterequest during retries

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Revert "Remove loggers"

This reverts commit 54f91dfcae20488944162335ab4ad8be459df1ab.

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* use log level debug for loggers

Signed-off-by: Marc Tuduri <marctc@protonmail.com>

* Fix linter

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove noisy debug-level logs; add 'reason' label to drop metrics

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove accidentally committed files

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Propagate logger to buildWriteRequest to log dropped data

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix docs comment

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Make drop reason more specific

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Remove unnecessary pass of logger

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Use snake_case for reason label

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

* Fix dropped samples metric

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>

---------

Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
Signed-off-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
Co-authored-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
Co-authored-by: Paschalis Tsilias <tpaschalis@users.noreply.github.com>
2024-01-05 10:40:30 -08:00
..
azuread golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
otlptranslator Enable default revive rules (#13068) 2023-11-29 17:23:34 +00: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 golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
client.go remote-write: respect Retry-After header on 5xx errors 2023-09-20 10:14:38 +00:00
client_test.go remote_write: add a unit test to make sure the write client sends 2023-11-09 15:56:48 +01:00
codec.go Move metric type definitions to common/model 2023-12-19 18:56:54 +00:00
codec_test.go Drop old inmemory samples (#13002) 2024-01-05 10:40:30 -08: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 golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +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 scrape: consistent function names for metadata 2023-11-23 09:08:02 +00:00
metadata_watcher_test.go Move metric type definitions to common/model 2023-12-19 18:56:54 +00:00
queue_manager.go Drop old inmemory samples (#13002) 2024-01-05 10:40:30 -08:00
queue_manager_test.go Drop old inmemory samples (#13002) 2024-01-05 10:40:30 -08:00
read.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
read_handler.go ci(lint): enable errorlint on storage (#12935) 2023-10-31 12:15:30 +01:00
read_handler_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
read_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
storage.go remote/storage.go: adjust Storage.Notify() to avoid a race condition with Storage.ApplyConfig() 2023-11-14 10:07:45 +01:00
storage_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
write.go Append Created Timestamps (#12733) 2023-12-11 08:43:42 +00:00
write_handler.go Consider storage.ErrTooOldSample as non-retryable 2023-12-26 18:44:39 +02:00
write_handler_test.go Drop old inmemory samples (#13002) 2024-01-05 10:40:30 -08:00
write_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00