[REFACTOR] Scraping: rename variables for clarity

Instead of shadowing the outer variables, use different names.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
pull/13914/head
Bryan Boreham 2024-04-10 15:39:17 +01:00
parent 3f6a133f26
commit 6380229c71
1 changed files with 4 additions and 4 deletions

View File

@ -350,12 +350,12 @@ func (sp *scrapePool) restartLoops(reuseCache bool) {
}
t := sp.activeTargets[fp]
interval, timeout, err := t.intervalAndTimeout(interval, timeout)
targetInterval, targetTimeout, err := t.intervalAndTimeout(interval, timeout)
var (
s = &targetScraper{
Target: t,
client: sp.client,
timeout: timeout,
timeout: targetTimeout,
bodySizeLimit: bodySizeLimit,
acceptHeader: acceptHeader(sp.config.ScrapeProtocols, validationScheme),
acceptEncodingHeader: acceptEncodingHeader(enableCompression),
@ -373,8 +373,8 @@ func (sp *scrapePool) restartLoops(reuseCache bool) {
trackTimestampsStaleness: trackTimestampsStaleness,
mrc: mrc,
cache: cache,
interval: interval,
timeout: timeout,
interval: targetInterval,
timeout: targetTimeout,
validationScheme: validationScheme,
fallbackScrapeProtocol: fallbackScrapeProtocol,
})