Skip to content

Commit

Permalink
Add line length to batchSize
Browse files Browse the repository at this point in the history
Signed-off-by: Eugen Biegler <nupagadi@posteo.de>
  • Loading branch information
negbie committed Dec 14, 2018
1 parent 86fbdc0 commit 10da0b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/promtail/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@ func (c *Client) run() {
if err := c.send(batch); err != nil {
level.Error(c.logger).Log("msg", "error sending batch", "error", err)
}
batchSize = 0
batch = map[model.Fingerprint]*logproto.Stream{}
}

batchSize += len(e.Line)
fp := e.labels.FastFingerprint()
stream, ok := batch[fp]
if !ok {
Expand Down

0 comments on commit 10da0b5

Please sign in to comment.