lib/promscrape: mention in scrape error message that scrape errors can be disabled by -promscrape.suppressScrapeErrors command-line flag

This commit is contained in:
Aliaksandr Valialkin 2020-12-06 23:26:34 +02:00
parent 22baf8fe25
commit 9d79d11a6c

View file

@ -221,7 +221,9 @@ func (sw *scrapeWork) run(stopCh <-chan struct{}) {
func (sw *scrapeWork) logError(s string) { func (sw *scrapeWork) logError(s string) {
if !*suppressScrapeErrors { if !*suppressScrapeErrors {
logger.ErrorfSkipframes(1, "error when scraping %q from job %q with labels %s: %s", sw.Config.ScrapeURL, sw.Config.Job(), sw.Config.LabelsString(), s) logger.ErrorfSkipframes(1, "error when scraping %q from job %q with labels %s: %s; "+
"scrape errors can be disabled by -promscrape.suppressScrapeErrors command-line flag",
sw.Config.ScrapeURL, sw.Config.Job(), sw.Config.LabelsString(), s)
} }
} }