Skip to content

in_kubernetes_events: log missed payload on level warn instead of debug#12021

Open
MarcWort wants to merge 1 commit into
fluent:masterfrom
MarcWort:kube-event-json-warn
Open

in_kubernetes_events: log missed payload on level warn instead of debug#12021
MarcWort wants to merge 1 commit into
fluent:masterfrom
MarcWort:kube-event-json-warn

Conversation

@MarcWort

@MarcWort MarcWort commented Jun 30, 2026

Copy link
Copy Markdown

While #11252 was closed incorrectly by stale-bot, and #11268 has had no recent activity, users should at least be warned about missed kubernetes events by logging them at warning level instead of debug level.


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:

  • [N/A] Example configuration file for the change
  • [N/A] Debug log output from testing the change
  • [N/A] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [N/A] Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

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.

Summary by CodeRabbit

  • Bug Fixes
    • Parsing failures for JSON event payloads now surface as warnings instead of debug messages, making malformed or incomplete payload issues easier to notice during operation.

While fluent#11252 closed
incorrectly by stale-bot, andhttps://github.com/fluent/pull/11268
has had no recent activity, users should at least be warned about missed
kubernetes events by logging them at warning level instead of debug level.

Signed-off-by: MarcWort <113890636+MarcWort@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f0179f17-ca4a-41c8-906f-5113d6a1dbd0

📥 Commits

Reviewing files that changed from the base of the PR and between b81c252 and 4fb42dd.

📒 Files selected for processing (1)
  • plugins/in_kubernetes_events/kubernetes_events.c

📝 Walkthrough

Walkthrough

In process_http_chunk, the log call for a failed flb_pack_json result is changed from flb_plg_debug to flb_plg_warn, keeping the same "incomplete or bad formed JSON" message and payload argument.

Changes

Log severity upgrade

Layer / File(s) Summary
Warn on malformed JSON payload
plugins/in_kubernetes_events/kubernetes_events.c
Log level for the "could not process payload, incomplete or bad formed JSON" message in process_http_chunk is changed from flb_plg_debug to flb_plg_warn.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny hopped through JSON land,
Found broken brackets, took a stand.
"No more silence!" cried the hare,
"A warning now shall fill the air!"
🐇 Bad JSON shall hide no more~

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change from debug to warning logging for missed Kubernetes event payloads.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant