Enhance log parsing and troubleshoot analysis: robust URL handling, tail-by-minutes, improved select/release matching and reporting - #1
Merged
Conversation
This branch had an error being deployed
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.
Motivation
https, hostnames and optional ports and consistently strip schemes for human-friendly reporting.DEBUG.Description
URL_REpattern and replaced many literalhttp://...regexes acrosslog_parser.py,stat_cache_hitrate.py, and analyzer modules to accept optionalhttp(s)://, hostnames, IPs and optional ports._strip_schemeutility in multiple modules and used it to present worker URLs withouthttp(s)://in reports and diagnostics.complete_time_argwithdatetime.now().yearand dynamic defaults.filter_file_by_recent_minutesand changed CLI--tailhandling introubleshoot.pyto acceptNm(minutes) or line counts;Nmnow filters by timestamp window.log_parser.match_select_release: build a key viarequest_id(preferred) orreq_id/trace_id/session_id, reportid_coverage, collectuntracked_selects, and add aworker_time_fallbackmatch within a configurablefallback_window_s. Added_parse_ts_safeand safer timestamp handling.untracked_selects,id_coverage,match_method) and updated analyzers/reports to respect cases with no correlatable IDs (showDeltaasN/Aand avoid misreporting).match_select_releaseusage, expanded token diagnostics inloadanalyzer, and added token-leak diagnoses.LEVEL_REto includeDEBUGand tightened several regexes to avoid accidental captures; updated parsing and formatting usages acrosstrace.py,health.py,cache.py,load.py, andstat_cache_hitrate.py.re,timedelta) where needed and small refactors to keep parsing robust and human-readable.Testing
Codex Task