scraping errors will show in the log when debug mode is enabled (#3135)
Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
This commit is contained in:
parent
c70379e1c7
commit
153cb0cbe3
|
@ -637,8 +637,11 @@ mainLoop:
|
|||
var b []byte
|
||||
if scrapeErr == nil {
|
||||
b = buf.Bytes()
|
||||
} else if errc != nil {
|
||||
errc <- scrapeErr
|
||||
} else {
|
||||
sl.l.With("err", scrapeErr.Error()).Debug("scrape failed")
|
||||
if errc != nil {
|
||||
errc <- scrapeErr
|
||||
}
|
||||
}
|
||||
|
||||
// A failed scrape is the same as an empty scrape,
|
||||
|
|
Loading…
Reference in New Issue