fix(detect_exceptions): use targeted patterns instead of catch-all for Java continuations - #304
fix(detect_exceptions): use targeted patterns instead of catch-all for Java continuations#304vparfonov wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
/assign @jcantrill |
|
/hold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcantrill, vparfonov The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
1 similar comment
|
/retest |
…r Java continuations Replace the generic catch-all rule (^.+$) with targeted continuation patterns that handle non-indented lines between exception headers and stack traces (LOG-9995) without greedily consuming independent JSON log records (LOG-9963). The catch-all caused detectMultilineException to merge unrelated single-line JSON logs into one event whenever a message contained an exception keyword like "Exception:" or "Error:". Targeted patterns added: - ^[A-Z]+-?\d+ error codes (ORA-12521, TNS-xxxxx) - ^[\t ]*\( parenthesized lines (CONNECTION_ID=...) - ^[\t ]+\S indented non-stack-frame lines Ref: LOG-9963, LOG-9995 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
c2e4dba to
8f00c0a
Compare
|
/hold cancel |
|
/test clo-functional |
|
/hold |
|
/hold Code freeze for 6.6.1 |
Summary
Fix incorrect multiline exception detection that was merging independent JSON log records (LOG-9963) while ensuring proper grouping of legitimate multi-line exceptions including Java exceptions with non-indented continuation lines like Oracle ORA errors (LOG-9995).
Problem
The
detect_exceptionstransform was using a catch-all regex pattern^.+$to match continuation lines of Java exceptions. This pattern was too greedy and would matchANYnon-empty line after an exception keyword, causing independent log records to be incorrectly merged into a single event.Example:
Result: 3 independent messages merged into 1 event
Solution
Replace the generic catch-all with 3 targeted continuation patterns that handle legitimate multi-line scenarios without matching arbitrary text:
^[A-Z]+-?\d+— Oracle ORA errors, DB error codes^[\t ]*\(— parenthetical continuations^[\t ]+\S— indented lines (standard stack frames)This allows proper grouping of:
While preventing merger of:
Fixes