scraping errors will show in the log when debug mode is enabled
@@ -637,9 +637,12 @@ mainLoop:
var b []byte
if scrapeErr == nil {
b = buf.Bytes()
- } else if errc != nil {
+ } 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,
// we still call sl.append to trigger stale markers.
