Skip to content

Conversation

@eschabell
Copy link
Contributor

@eschabell eschabell commented Nov 28, 2025

in_ebp: add three missing config option descriptions for:

ringbuf_map_name - should describe the BPF ring buffer map name
poll_ms - should describe the polling interval in milliseconds
Trace - should describe the trace type to enable (for example, bind, malloc, signal)

Fixes #11221


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

Documentation

Backporting

  • [N/A ] 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

  • Documentation
    • Added user-facing descriptions for eBPF plugin configuration options:
      • ring buffer map name: clarifies which ring buffer to read events from.
      • polling interval: clarifies the interval (ms) used to collect events.
      • trace settings: explains how to specify eBPF traces and that the option can be provided multiple times.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

Walkthrough

Added description strings to each config_map entry in the eBPF input plugin and updated the public config map structure to include a description member so the options ringbuf_map_name, poll_ms, and Trace now have help text.

Changes

Cohort / File(s) Summary
eBPF plugin config
plugins/in_ebpf/in_ebpf.c
Added description strings to three config_map entries: ringbuf_map_name ("Set the name of the eBPF ring buffer map to read events from"), poll_ms ("Set the polling interval in milliseconds for collecting events"), and Trace ("Set the eBPF trace to enable (for example, bind, malloc, signal). Can be set multiple times"). Added EOF marker comment in the array.
Public config map declaration
include/...flb_config_map*
Public struct flb_config_map now includes a description (const char *) member so config entries can carry descriptive strings; initializers updated accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Focus review on ensuring all struct flb_config_map initializers across the codebase were updated to include the new description field.
  • Verify build and help output for plugins that use config_map.

Possibly related PRs

Suggested reviewers

  • edsiper
  • cosmo0920

Poem

🐰 I hopped through code to leave a clue,
Ringbuf, poll, and Trace — now told true.
Tiny strings that softly gleam,
Guiding users like a dream. ✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ 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 accurately describes the main change: adding three missing config option descriptions for the in_ebpf plugin, directly addressing the linked issue.
Linked Issues check ✅ Passed The PR successfully implements all three required config option descriptions (ringbuf_map_name, poll_ms, Trace) as specified in issue #11221.
Out of Scope Changes check ✅ Passed All changes are directly scoped to adding the three missing descriptions; no extraneous modifications were introduced.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03ae324 and 73a7598.

📒 Files selected for processing (1)
  • plugins/in_ebpf/in_ebpf.c (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-21T06:23:29.770Z
Learnt from: cosmo0920
Repo: fluent/fluent-bit PR: 11171
File: include/fluent-bit/flb_lib.h:52-53
Timestamp: 2025-11-21T06:23:29.770Z
Learning: In Fluent Bit core (fluent/fluent-bit repository), function descriptions/documentation are not required for newly added functions in header files.

Applied to files:

  • plugins/in_ebpf/in_ebpf.c
🪛 Cppcheck (2.18.0)
plugins/in_ebpf/in_ebpf.c

[information] Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

(normalCheckLevelMaxBranches)


[information] Too many #ifdef configurations - cppcheck only checks 12 configurations. Use --force to check all configurations. For more details, use --enable=information.

(toomanyconfigs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (31)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit, x64, x64-windows-static, 3.31.6)
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 64bit (Arm64), amd64_arm64, -DCMAKE_SYSTEM_NAME=Windows -DCMA...
  • GitHub Check: pr-windows-build / call-build-windows-package (Windows 32bit, x86, x86-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COVERAGE=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_ARROW=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COMPILER_STRICT_POINTER_TYPES=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: PR - fuzzing test
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-22.04, clang-12)
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: pr-compile-centos-7
🔇 Additional comments (1)
plugins/in_ebpf/in_ebpf.c (1)

234-250: LGTM! Config descriptions successfully added.

The three config option descriptions are clear, accurate, and directly address issue #11221:

  • ringbuf_map_name: Correctly describes the BPF ring buffer map name (verified against usage at line 48)
  • poll_ms: Accurately describes the polling interval in milliseconds (verified against usage at line 182)
  • Trace: Properly describes the trace type with helpful examples and notes the multi-value capability (matches the FLB_CONFIG_MAP_MULT flag and manual processing at lines 165-177)

The struct initialization syntax is correct, and the EOF comment marker is a good practice.


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 and usage tips.

@eschabell
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@DavidKorczynski
Copy link
Contributor

DavidKorczynski commented Nov 28, 2025

The CIFuzz crashing here is not due to this PR, it is due to some infrastructure updates on OSS-Fuzz. Ref: #11227

@edsiper
Copy link
Member

edsiper commented Dec 3, 2025

let's cleanup the history of this PR (commits)

image

@eschabell
Copy link
Contributor Author

@edsiper fixed the commit messages.

Add descriptions for three config options that were missing documentation:
- log_encoder
- log_encoding (with typo fix)
- gelf_*_key options

Fixes fluent#11221.

Signed-off-by: Eric D. Schabell <eric@schabell.org>
@eschabell
Copy link
Contributor Author

@edsiper squashed commits.

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.

in_ebpf: all three input plugin config options are missing descriptions

4 participants