prometheus/scrape
Bryan Boreham 1a1e254244 [BUGFIX] Scraping: bump cache iteration after error
We use the cache iteration number to detect when the same metric has
occurred twice in a scrape. We need to bump this number at the end of
every scrape, not just successful scrapes.

The `iter` number is also used:
* After a successful scrape, to delete older metrics and metadata.
* To detect when metadata changed in this scrape.

None of those additional cases is broken by incrementing the number
on error.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-03-05 17:08:05 +00:00
..
testdata Include test CA text info (#14699) 2024-08-20 19:41:02 +02:00
clientprotobuf.go lint: Revamp our linting rules, mostly around doc comments 2024-08-22 17:36:11 +02:00
helpers_test.go refactor: use a more straightforward return value (#16070) 2025-02-24 12:25:57 +00:00
manager.go ref: JSONFileLogger slog handler, add scrape.FailureLogger interface 2024-11-28 23:14:31 -05:00
manager_test.go chore: enable unused-parameter from revive 2025-02-19 19:50:28 +01:00
metrics.go Scraping: add metric for symbol table size 2024-07-05 10:16:22 +01:00
scrape.go [BUGFIX] Scraping: bump cache iteration after error 2025-03-05 17:08:05 +00:00
scrape_test.go [BUGFIX] Scraping: bump cache iteration after error 2025-03-05 17:08:05 +00:00
target.go scrape: Fix metadata in WAL not working for histograms and summaries. 2025-01-15 20:12:38 +00:00
target_test.go chore: enable unused-parameter from revive 2025-02-19 19:50:28 +01:00