Skip to content

Commit

Permalink
remove the read lines counter when the log file stops being tailed
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Welch <edward.welch@grafana.com>
  • Loading branch information
slim-bean committed Mar 4, 2020
1 parent 6f3489e commit 8726033
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/promtail/targets/tailer.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func (t *tailer) stop() error {
<-t.done
filesActive.Add(-1.)
// When we stop tailing the file, also un-export metrics related to the file
readLines.DeleteLabelValues(t.path)
readBytes.DeleteLabelValues(t.path)
totalBytes.DeleteLabelValues(t.path)
logLengthHistogram.DeleteLabelValues(t.path)
Expand Down

0 comments on commit 8726033

Please sign in to comment.