Skip to content

Commit

Permalink
fix: scraper_added metrics
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adityathebe authored and moshloop committed Dec 9, 2024
1 parent 2b71eb7 commit 1413865
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions db/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1413865

Please sign in to comment.