Skip to content

feat: support 'compress gzip' setting in fluentd plugin - #18995

Merged
chaudum merged 3 commits into
grafana:mainfrom
girasolenergy:codex/2025-08-25-08-31-30
Sep 2, 2025
Merged

feat: support 'compress gzip' setting in fluentd plugin#18995
chaudum merged 3 commits into
grafana:mainfrom
girasolenergy:codex/2025-08-25-08-31-30

Conversation

@miettal

@miettal miettal commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

I added gzip compression function to fluentd plugin

Which issue(s) this PR fixes:

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
    • default is off. this is compatible to past behavior.
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
@miettal
miettal requested a review from a team as a code owner August 25, 2025 08:35
@CLAassistant

CLAassistant commented Aug 25, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@miettal
miettal force-pushed the codex/2025-08-25-08-31-30 branch from 96c7545 to f98e076 Compare August 25, 2025 08:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Hiromasa Ihara <iharahiromasa@gmail.com>

@chaudum chaudum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@miettal Thanks for the contribution!

LGTM, with a small suggestion.

payload = Yajl.dump(body)
if @compress == :gzip
req.add_field('Content-Encoding', 'gzip')
io = StringIO.new

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: io is an unusual variable name, I would prefer something more descriptive, like compressed or something similar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree!, Now I commited this change.

@chaudum
chaudum merged commit 1cda925 into grafana:main Sep 2, 2025
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants