-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
out_loki: add compress option for gzip #7949
Conversation
a6acd89
to
b69692c
Compare
b69692c
to
ef05cc4
Compare
Removed unnecessary changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments for the first impressions.
Thank you for the review. I pushed the changes. with gzip
without gzip
|
It looks great. Thanks for addressing my comments. I'll confirm this PR with the actual Loki and associated Grafana instances tomorrow. |
I confirmed that your PR is working as expected: Command% bin/fluent-bit -i dummy -o loki
Fluent Bit v2.1.10
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
[2023/09/21 10:54:47] [ info] [fluent bit] version=2.1.10, commit=398f4346ae, pid=2472415
[2023/09/21 10:54:47] [ info] [storage] ver=1.1.6, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2023/09/21 10:54:47] [ info] [cmetrics] version=0.6.3
[2023/09/21 10:54:47] [ info] [ctraces ] version=0.3.1
[2023/09/21 10:54:47] [ info] [input:dummy:dummy.0] initializing
[2023/09/21 10:54:47] [ info] [input:dummy:dummy.0] storage_strategy='memory' (memory only)
[2023/09/21 10:54:47] [ info] [output:loki:loki.0] configured, hostname=127.0.0.1:3100
[2023/09/21 10:54:47] [ info] [sp] stream processor started
^C[2023/09/21 10:54:50] [engine] caught signal (SIGINT)
[2023/09/21 10:54:50] [ warn] [engine] service will shutdown in max 5 seconds
[2023/09/21 10:54:50] [ info] [input] pausing dummy.0
[2023/09/21 10:54:51] [ info] [engine] service has stopped (0 pending tasks)
[2023/09/21 10:54:51] [ info] [input] pausing dummy.0
% bin/fluent-bit -i dummy -o loki -pcompress=gzip
Fluent Bit v2.1.10
* Copyright (C) 2015-2022 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io
[2023/09/21 10:54:52] [ info] [fluent bit] version=2.1.10, commit=398f4346ae, pid=2472520
[2023/09/21 10:54:52] [ info] [storage] ver=1.1.6, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2023/09/21 10:54:52] [ info] [cmetrics] version=0.6.3
[2023/09/21 10:54:52] [ info] [ctraces ] version=0.3.1
[2023/09/21 10:54:52] [ info] [input:dummy:dummy.0] initializing
[2023/09/21 10:54:52] [ info] [input:dummy:dummy.0] storage_strategy='memory' (memory only)
[2023/09/21 10:54:52] [ info] [output:loki:loki.0] configured, hostname=127.0.0.1:3100
[2023/09/21 10:54:52] [ info] [sp] stream processor started
^C[2023/09/21 10:54:55] [engine] caught signal (SIGINT)
[2023/09/21 10:54:55] [ warn] [engine] service will shutdown in max 5 seconds
[2023/09/21 10:54:55] [ info] [input] pausing dummy.0
[2023/09/21 10:54:55] [ info] [engine] service has stopped (0 pending tasks)
[2023/09/21 10:54:55] [ info] [input] pausing dummy.0 Result on Loki and associated Grafana instances |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly speaking, I'm also writing for gzip compression patch. But, I love to use yours.
This approach looks better than mine. Thanks for your contribution. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, one thing. This patch looks great but the commit message does not follow our guideline.
So, could you use out_loki: ...
style instead of feat(out_loki): ...
?
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
Signed-off-by: Kazuhiro Suzuki <[email protected]>
398f434
to
c887734
Compare
Waiting for CI results... And thanks for the quick response. 💪 |
Sorry for the overlap in the task. I appreciate your help. 🙏 |
No worries. Encouraging for a new contributor is also important for us. 😄 |
thank you! |
--------- Signed-off-by: Kazuhiro Suzuki <[email protected]>
Add compress option for gzip compression in out_loki
Fixes #7917
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
Run loki
I'm not sure what I should write here. Any example?
with gzip
without gzip
how to query loki
with gzip
without gzip
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
fluent/fluent-bit-docs#1199
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.