From 13213a4fd41d46b8af8e8635670920dc2515d11e Mon Sep 17 00:00:00 2001 From: Edward Welch Date: Fri, 28 Aug 2020 12:44:58 -0400 Subject: [PATCH] clone labels when sending them to Handle function for stdin target --- pkg/promtail/targets/stdin/stdin_target_manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/promtail/targets/stdin/stdin_target_manager.go b/pkg/promtail/targets/stdin/stdin_target_manager.go index 2dd0e1e196802..5dbbf8a7f7a62 100644 --- a/pkg/promtail/targets/stdin/stdin_target_manager.go +++ b/pkg/promtail/targets/stdin/stdin_target_manager.go @@ -146,7 +146,7 @@ func (t *readerTarget) read() { } continue } - if err := t.out.Handle(t.lbs, time.Now(), line); err != nil { + if err := t.out.Handle(t.lbs.Clone(), time.Now(), line); err != nil { level.Error(t.logger).Log("msg", "error sending line", "err", err) } if err == io.EOF {