feat: add sanitized parse-error report for log aggregation (closes #1)#18
Open
cwjcwj95 wants to merge 9 commits into
Open
feat: add sanitized parse-error report for log aggregation (closes #1)#18cwjcwj95 wants to merge 9 commits into
cwjcwj95 wants to merge 9 commits into
Conversation
Add --parse-error-report PATH option to generate a JSON summary of parse failures without leaking raw log payloads. Changes: - Add ParseError class to record failures with sanitized messages - Add _sanitize_error_message() to redact secret-looking values - Add parse_with_error() to all parsers for granular error tracking - Add get_parse_error_report() and export_parse_error_report() - Track unmatched lines as UnmatchedLine parse errors - Include parse error counts in summary and HTML output - Add tests covering valid logs, malformed JSON, and sanitized report Closes 9904099#1
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.
Summary
This PR adds a parse-error reporting mode that records malformed JSON/text parse failures without leaking full log payloads, as requested in the bounty.
Changes
_sanitize_error_message()redacts potential secret values (API keys, tokens, passwords) and_get_line_fingerprint()generates content hashes without exposing raw log lines.parse_with_error()for granular error tracking.--parse-error-report PATHwrites a JSON summary with failures grouped by file and parser type.Acceptance Criteria
--parse-error-reportwrites JSON summary of parse failurespython3 build.py)Required Validation
python3 build.py✅.logdartifact (attached)/claim #1