in_node_exporter_metrics: expire metrics for networking - #12372
Conversation
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe netdev collectors now expire labels for devices absent from a scan. Runtime coverage adds diskstats output validation and a Linux test for stale network-device removal. ChangesNetwork metric expiration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change removes metrics for network interfaces that disappear between scans and adds runtime coverage for the expected lifecycle. No merge-blocking risk is currently identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
fluent-bit/tests/runtime/CMakeLists.txt
Lines 38 to 40 in a41394d
This commit combines the node-exporter plugin implementation with a new runtime test and its CMake registration, while the repository requires plugin changes and tests to be separate commits. Move this registration and in_node_exporter_metrics.c into a tests: runtime: commit, leaving the plugin changes in the component commit.
AGENTS.md reference: AGENTS.md:L174-L179
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This is because network interfaces sometimes absent after VM creation and exit.
The test is now implemented in the existing runtime binary at in_node_exporter_metrics.c and registered at line 314.
Summary:
/proc/net/devcontainingeth0andveth-stale.veth-stale.eth0but removesveth-stale.The existing
diskstatstest was restored in the same binary. The netdev test is Linux-only, so macOS correctly reports one test; Linux will report two. The CMake registration now supports the binary on both platforms at CMakeLists.txtVerification:
cmake --build build --target flb-rt-in_node_exporter_metrics -j8— passed.ctest --test-dir build -R '^flb-rt-in_node_exporter_metrics$' --output-on-failure— passed on macOS (diskstats).Closes #9400.
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:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
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
Tests