Add log messages for out of order samples

This commit is contained in:
Brian Brazil 2017-05-10 14:44:13 +01:00
parent 3c45400130
commit 95162ebc16
1 changed files with 17 additions and 2 deletions

View File

@ -567,7 +567,13 @@ loop:
samplesScraped[sl.lsetCache[ref].str] = sl.lsetCache[ref].lset
case storage.ErrNotFound:
ok = false
case errSeriesDropped, storage.ErrOutOfOrderSample, storage.ErrDuplicateSampleForTimestamp:
case errSeriesDropped:
continue
case storage.ErrOutOfOrderSample:
log.With("timeseries", string(met)).Warn("Out of order sample")
continue
case storage.ErrDuplicateSampleForTimestamp:
log.With("timeseries", string(met)).Warn("Duplicate sample for timestamp")
continue
default:
break loop
@ -581,7 +587,16 @@ loop:
// TODO(fabxc): also add a dropped-cache?
switch err {
case nil:
case errSeriesDropped, storage.ErrOutOfOrderSample, storage.ErrDuplicateSampleForTimestamp:
case errSeriesDropped:
err = nil
continue
case storage.ErrOutOfOrderSample:
err = nil
log.With("timeseries", string(met)).Warn("Out of order sample")
continue
case storage.ErrDuplicateSampleForTimestamp:
err = nil
log.With("timeseries", string(met)).Warn("Duplicate sample for timestamp")
continue
default:
break loop