fix(logfmt): use debug logging instead of error similar to what json plugin does - #20885
Merged
Merged
Conversation
Contributor
|
Hey @abenbachir! Please fix the PR title and add a description and the reasoning behind this PR. The PR is very small and I can guess what you were trying to solve, but it is necessary to have complete commit messages and PR descriptions for paper-trail and understanding purposes. Thank you! |
Contributor
Author
thanks, updated the PR. |
spiridonov
approved these changes
Apr 7, 2026
This was referenced Apr 20, 2026
This was referenced May 20, 2026
This was referenced Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
The logfmt pipeline stage no longer logs decode failures at error level; it now logs them at debug level and only when the global Debug flag is enabled, aligning its behavior with other parsing stages.
When we use logfmt fields retreival, errors are dumped to promtail logs polluting logs, these errors are only related to field not found. The JSON parser report these errors as debug so I think logfmt should do the same.
Usage
Which issue(s) this PR fixes:
Fixes #6066
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PRNote
Low Risk
Low risk: only changes log level/conditional emission for logfmt decode errors, with no impact on parsing behavior or extracted data.
Overview
The
logfmtpipeline stage no longer logs decode failures at error level; it now emits alevel.Debugmessage only when the globalDebugflag is enabled.This reduces log noise from expected/benign logfmt decode issues (e.g., missing fields) while leaving extraction behavior unchanged.
Reviewed by Cursor Bugbot for commit 8296b29. Bugbot is set up for automated code reviews on this repo. Configure here.