From 141386587cded9afb615655fdb2029380a025684 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Mon, 9 Dec 2024 18:13:56 +0545 Subject: [PATCH] fix: scraper_added metrics when a new config was inserted, we never updated the temp cache. As a result, once the config is set as not found - any subsequent Get() calls to that config returns not found and we treat the same config as a new one. --- db/update.go | 1 + 1 file changed, 1 insertion(+) diff --git a/db/update.go b/db/update.go index 3b726610..37d4f635 100644 --- a/db/update.go +++ b/db/update.go @@ -568,6 +568,7 @@ func saveResults(ctx api.ScrapeContext, results []v1.ScrapeResult) (v1.ScrapeSum } for _, config := range extractResult.newConfigs { summary.AddInserted(config.Type) + ctx.TempCache().Insert(*config) } // nonUpdatedConfigs are existing configs that were not updated in this scrape.