mirror of https://github.com/prometheus/prometheus
[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
parent
3f6a133f26
commit
6380229c71
|
@ -350,12 +350,12 @@ func (sp *scrapePool) restartLoops(reuseCache bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
t := sp.activeTargets[fp]
|
t := sp.activeTargets[fp]
|
||||||
interval, timeout, err := t.intervalAndTimeout(interval, timeout)
|
targetInterval, targetTimeout, err := t.intervalAndTimeout(interval, timeout)
|
||||||
var (
|
var (
|
||||||
s = &targetScraper{
|
s = &targetScraper{
|
||||||
Target: t,
|
Target: t,
|
||||||
client: sp.client,
|
client: sp.client,
|
||||||
timeout: timeout,
|
timeout: targetTimeout,
|
||||||
bodySizeLimit: bodySizeLimit,
|
bodySizeLimit: bodySizeLimit,
|
||||||
acceptHeader: acceptHeader(sp.config.ScrapeProtocols, validationScheme),
|
acceptHeader: acceptHeader(sp.config.ScrapeProtocols, validationScheme),
|
||||||
acceptEncodingHeader: acceptEncodingHeader(enableCompression),
|
acceptEncodingHeader: acceptEncodingHeader(enableCompression),
|
||||||
|
@ -373,8 +373,8 @@ func (sp *scrapePool) restartLoops(reuseCache bool) {
|
||||||
trackTimestampsStaleness: trackTimestampsStaleness,
|
trackTimestampsStaleness: trackTimestampsStaleness,
|
||||||
mrc: mrc,
|
mrc: mrc,
|
||||||
cache: cache,
|
cache: cache,
|
||||||
interval: interval,
|
interval: targetInterval,
|
||||||
timeout: timeout,
|
timeout: targetTimeout,
|
||||||
validationScheme: validationScheme,
|
validationScheme: validationScheme,
|
||||||
fallbackScrapeProtocol: fallbackScrapeProtocol,
|
fallbackScrapeProtocol: fallbackScrapeProtocol,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue