Skip to content

Commit

Permalink
Avoid breaking the json log with series string (#2104)
Browse files Browse the repository at this point in the history
Signed-off-by: Anas <[email protected]>
  • Loading branch information
anas-aso authored Feb 8, 2020
1 parent f034581 commit 5a93f51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/compact/downsample/streamed_block_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"io"
"path/filepath"
"strings"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
Expand Down Expand Up @@ -111,7 +112,7 @@ func (w *streamedBlockWriter) WriteSeries(lset labels.Labels, chunks []chunks.Me
}

if len(chunks) == 0 {
level.Warn(w.logger).Log("empty chunks happened, skip series", lset)
level.Warn(w.logger).Log("msg", "empty chunks happened, skip series", "series", strings.ReplaceAll(lset.String(), "\"", "'"))
return nil
}

Expand Down

0 comments on commit 5a93f51

Please sign in to comment.