in_gpu_metrics: updated config parameters descriptions.
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-testlabel to test for all targets (requires maintainer to do).
Documentation
- [X] Documentation required for this feature
Doc update PR: https://github.com/fluent/fluent-bit-docs/pull/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.
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_sysfsandscrape_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 0e25a1fb254046776048f7865e95c9821384a3d1 and 2c2480b09248ab9c2c3cc941c394c0e247fab6fe.
π 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_excludeoption is well documented with the supported pattern formats. The description is consistent withcards_includeand 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_sysfsissue 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
let's cleanup the history of this PR (commits)
@edsiper fixed commit messages.
@eschabell thanks for the updates. Looking at the current history of commits in this PR:
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.
@edsiper squashed it!