Add support for excluding specific containers in log analysis across multiple healthcheck runbooks#630
Merged
stewartshea merged 3 commits intorunwhen-contrib:mainfrom Mar 25, 2026
Conversation
…multiple healthcheck runbooks
- Introduced a new variable `${EXCLUDED_CONTAINER_NAMES}` to allow users to specify container names to exclude from log analysis.
- Updated relevant log analysis functions in the DaemonSet, StatefulSet, Deployment, and Stacktrace healthcheck runbooks to utilize the new exclusion feature.
- Enhanced the suite initialization to handle the conversion of the excluded container names into a list for processing.
- Improved documentation to clarify the purpose and usage of the new exclusion functionality.
…n` for consistency across CLI and K8s applications. This change enhances clarity in log messages and aligns with updated logging practices.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
- Adjusted regex to remove numbers with 5 or more digits, improving log clarity by preserving smaller byte counts and HTTP status codes. - Enhanced comments for better understanding of the filtering logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

${EXCLUDED_CONTAINER_NAMES}to allow users to specify container names to exclude from log analysis.Note
Medium Risk
Modifies log scanning/anomaly analysis and multiple Kubernetes runbooks; incorrect exclusion handling or updated log-line normalization could hide real issues or change grouping/severity results.
Overview
Adds a new
EXCLUDED_CONTAINER_NAMESinput (parsed/trimmed into@{EXCLUDED_CONTAINERS}) and wires it through DaemonSet and StatefulSet log fetch/scan/anomaly tasks so selected sidecar containers can be omitted from analysis.Enhances the Deployment runbook’s raw log collection with an optional
CONTAINER_NAME; when unset it auto-selects the first non-excluded container before runningkubectl logs.Updates
RW.K8sLogto actually skip excluded containers during scan/anomaly processing, improves log-line grouping normalization (more timestamp formats, IPs, floats, large IDs), and standardizes several warnings tologger.warn.Written by Cursor Bugbot for commit 04965f7. This will update automatically on new commits. Configure here.