Skip to content

Conversation

@eschabell
Copy link
Contributor

@eschabell eschabell commented Dec 2, 2025

The following updates help make the config parameter descriptions more informative:

  • Sort configuration parameters alphabetically
  • Add detailed pattern format info to cards_include and cards_exclude (supports '*' for all, comma-separated IDs, and ranges like '0-2')
  • Add specific metric names to enable_power and enable_temperature
    • Standardize path_sysfs description to 'sysfs mount point'
  • Add trailing periods to descriptions for consistency

Fixes #11236.


Testing

  • [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

  • Documentation required for this feature

Doc update PR: fluent/fluent-bit-docs#2259

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 GPU exclusion option (supports wildcards, comma-separated IDs, ranges) and clarified inclusion semantics.
    • Clarified that power and temperature docs refer to GPU-specific metrics.
    • Added configurable sysfs mount point (default "/sys") and configurable scrape interval (default 5s) for GPU metrics collection.
    • Minor phrasing updates across the GPU metrics configuration docs.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

Updated plugin configuration text in plugins/in_gpu_metrics/gpu_metrics.c: added cards_exclude, path_sysfs, and scrape_interval options; clarified cards_include, enable_power, and enable_temperature descriptions; reordered config map entries. No functional code or public API changes.

Changes

Cohort / File(s) Summary
GPU Metrics config strings
plugins/in_gpu_metrics/gpu_metrics.c
Added cards_exclude config option (supports *, comma-separated IDs, ranges); reworded cards_include to reflect ID-based semantics; changed enable_power/enable_temperature descriptions to reference gpu_power_watts and gpu_temperature_celsius; added path_sysfs (default /sys) and scrape_interval (default 5); reordered config_map entries and adjusted various descriptions. No API/behavior changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file with config/help string edits.
  • Pay attention to exact wording and defaults for path_sysfs and scrape_interval.

Suggested reviewers

  • edsiper
  • cosmo0920
  • patrick-stephens

Poem

🐰
I hopped through strings and polished each line,
Excluded cards, sysfs paths, and timings align.
Watts and degrees now named clear and true,
A tiny rabbit's change — concise and new. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main objective: updating configuration parameter descriptions for the in_gpu_metrics plugin.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from issue #11236: improved parameter descriptions, sorted configuration, pattern format details, specific metric names, and standardized descriptions with consistent punctuation.
Out of Scope Changes check ✅ Passed All changes directly support the objective of improving configuration parameter descriptions; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 0e25a1f and 2c2480b.

📒 Files selected for processing (1)
  • plugins/in_gpu_metrics/gpu_metrics.c (1 hunks)
🧰 Additional context used
🪛 Cppcheck (2.18.0)
plugins/in_gpu_metrics/gpu_metrics.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 32bit, x86, x86-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 64bit, x64, x64-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_ARROW=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_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COVERAGE=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_COMPILER_STRICT_POINTER_TYPES=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=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 (-DFLB_SANITIZE_THREAD=On, 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, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=Off, 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_SANITIZE_THREAD=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 (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • 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, clang, clang++, ubuntu-24.04, clang-14)
  • 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-centos-7
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: PR - fuzzing test
🔇 Additional comments (4)
plugins/in_gpu_metrics/gpu_metrics.c (4)

170-175: Well-structured addition with clear documentation.

The new cards_exclude option is well documented with the supported pattern formats. The description is consistent with cards_include and clearly communicates the expected input formats to users.


177-181: LGTM!

The updated description provides clear pattern format documentation consistent with cards_exclude.


182-191: Good improvement: metric names now visible in help output.

Including the specific metric names (gpu_power_watts, gpu_temperature_celsius) in the descriptions helps users understand exactly which metrics are controlled by these options. The metric names correctly correspond to the gauge definitions at lines 103 and 107.


192-201: LGTM!

Both entries have clear, concise descriptions with consistent trailing periods. The path_sysfs issue from the previous review has been addressed.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 10ebd3a and c27aea0.

📒 Files selected for processing (1)
  • plugins/in_gpu_metrics/gpu_metrics.c (1 hunks)
⏰ 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 (Arm64), amd64_arm64, -DCMAKE_SYSTEM_NAME=Windows -DCMA...
  • 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 32bit, x86, x86-windows-static, 3.31.6)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=On, 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 (-DSANITIZE_ADDRESS=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_THREAD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SIMD=Off, 3.31.6, gcc, g++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-24.04, clang-14)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=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_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_SIMD=On, 3.31.6, clang, clang++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SMALL=On, 3.31.6, clang, clang++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-24.04, clang-14)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_UNDEFINED=On, 3.31.6, gcc, g++)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_SANITIZE_MEMORY=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, clang, clang++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, clang, clang++, ubuntu-22.04, clang-12)
  • GitHub Check: run-ubuntu-unit-tests (-DFLB_JEMALLOC=On, 3.31.6, gcc, g++)
  • GitHub Check: pr-compile-system-libs (-DFLB_PREFER_SYSTEM_LIBS=On, 3.31.6, gcc, g++, ubuntu-22.04, clang-12)
  • GitHub Check: run-ubuntu-unit-tests (-DSANITIZE_ADDRESS=On, 3.31.6, clang, clang++)
  • GitHub Check: pr-compile-without-cxx (3.31.6)
  • GitHub Check: pr-compile-centos-7
  • GitHub Check: PR - fuzzing test
🔇 Additional comments (2)
plugins/in_gpu_metrics/gpu_metrics.c (2)

183-191: LGTM! Clear metric name references.

The descriptions correctly reference the specific metric names (gpu_power_watts and gpu_temperature_celsius) that match the gauge creation at lines 103-105 and 107-109. This helps users understand exactly which metrics are affected.


171-181: The pattern format descriptions are accurate and well-documented. The referenced formats—wildcards (*), comma-separated IDs (e.g., 0,1,2), and ranges (e.g., 0-2)—are all supported by the plugin according to official Fluent Bit documentation. The descriptions also correctly reflect the default values: cards_include defaults to "*" (all cards) and cards_exclude defaults to "" (none excluded). No issues found.

@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 commit messages.

@edsiper
Copy link
Member

edsiper commented Dec 5, 2025

@eschabell thanks for the updates. Looking at the current history of commits in this PR:

image

the last commit at bottom says "Added review comment fix" --> however this actually a fix for a change I asked before, its not related to a real code change, I think both commits can be squashed in one since the last one is not needed.

- Sort configuration parameters alphabetically
- Add detailed pattern format info to cards_include and cards_exclude
  (supports '*' for all, comma-separated IDs, and ranges like '0-2')
- Add specific metric names to enable_power and enable_temperature
- Standardize path_sysfs description to 'sysfs mount point'
- Add trailing periods to descriptions for consistency

Fixes fluent#11236.

Signed-off-by: Eric D. Schabell <[email protected]>
@eschabell
Copy link
Contributor Author

@edsiper squashed it!

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_gpu_metrics: updated config parameters descriptions

3 participants