Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fluentbit logfmt. #1791

Merged
merged 2 commits into from
Mar 17, 2020
Merged

Conversation

cyriltovena
Copy link
Contributor

Signed-off-by: Cyril Tovena [email protected]

This replace the custom fmt.Sprintf by a logfmt encoder making sure values with spaces are correctly quoted if needed. If the value is a complex value (map/array) it defaults to fmt.Sprintf but still use logfmt.

Fixes #1784

Signed-off-by: Cyril Tovena <[email protected]>
Signed-off-by: Cyril Tovena <[email protected]>
@codecov-io
Copy link

Codecov Report

Merging #1791 into master will increase coverage by 0.08%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1791      +/-   ##
=========================================
+ Coverage   64.42%   64.5%   +0.08%     
=========================================
  Files         122     122              
  Lines        9239    9242       +3     
=========================================
+ Hits         5952    5962      +10     
+ Misses       2874    2870       -4     
+ Partials      413     410       -3
Impacted Files Coverage Δ
cmd/fluent-bit/loki.go 83.84% <72.72%> (-1.2%) ⬇️
pkg/logql/evaluator.go 91.81% <0%> (+0.58%) ⬆️
pkg/promtail/targets/filetarget.go 70.55% <0%> (+1.84%) ⬆️
pkg/promtail/targets/tailer.go 78.4% <0%> (+4.54%) ⬆️

Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Love to see bugs like this get squashed.

@cyriltovena cyriltovena merged commit 59410df into grafana:master Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fluent-bit Loki Plugin key_value format
3 participants