Log scrape append failures as debug rather than warn. (#6852)

This is most likely due to an endpoint not producing valid
metrics output, which we should treat the same as a failed
scrape, and thus not spam the application logs with it.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
This commit is contained in:
Brian Brazil 2020-03-06 00:46:03 +00:00 committed by GitHub
parent 44ad28dd5e
commit 5da8990053
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -965,7 +965,7 @@ mainLoop:
// we still call sl.append to trigger stale markers.
total, added, seriesAdded, appErr := sl.append(b, contentType, start)
if appErr != nil {
level.Warn(sl.l).Log("msg", "append failed", "err", appErr)
level.Debug(sl.l).Log("msg", "append failed", "err", appErr)
// The append failed, probably due to a parse error or sample limit.
// Call sl.append again with an empty scrape to trigger stale markers.
if _, _, _, err := sl.append([]byte{}, "", start); err != nil {