Need to set the number of bytes read, not add them.

Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
pull/415/head
Tom Wilkie 6 years ago
parent 9ab14c9e0a
commit d495c68ef9
  1. 2
      pkg/promtail/targets/tailer.go

@ -119,7 +119,7 @@ func (t *tailer) markPosition() error {
return err
}
readBytes.WithLabelValues(t.path).Add(float64(pos))
readBytes.WithLabelValues(t.path).Set(float64(pos))
level.Debug(t.logger).Log("path", t.path, "filename", t.filename, "current_position", pos)
t.positions.Put(t.filename, pos)
return nil

Loading…
Cancel
Save