Skip to content

Commit

Permalink
Need to set the number of bytes read, not add them.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wilkie <[email protected]>
  • Loading branch information
tomwilkie committed Mar 20, 2019
1 parent 9ab14c9 commit d495c68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/promtail/targets/tailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d495c68

Please sign in to comment.