[ 
https://issues.apache.org/jira/browse/CAMEL-24911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18118126#comment-18118126
 ] 

Claus Ibsen commented on CAMEL-24911:
-------------------------------------

Implemented in PR https://github.com/apache/camel/pull/26754

Errors are counted per kind (routeId, node, exception type, exception message). 
Only the newest {{maximumEntriesPerKind}} (default 3) exchanges of a kind are 
kept, while the counter of that kind keeps rising - also after its older 
entries were evicted - so a storm reads as 132 ... 147 ... 188 instead of 
evicting every other error. Counters are bounded to 100 kinds, the least 
recently seen aging out.

* 
{{BacklogErrorEventMessage.getRepeatCount/getRepeatFirstTimestamp/getRepeatLastTimestamp}}
 (@since 4.23), written to the JSON only when the error repeated
* {{maximumEntriesPerKind}} on the ErrorRegistry SPI, the JMX mbean and 
{{camel.main.errorRegistry.maximumEntriesPerKind}}
* the errors dev console prints the repeat line, {{camel get errors}} has a 
COUNT column
* {{camel_get_log}} folds a run of identical consecutive log records into one 
record with {{repeated}} and {{firstTime}}

> camel-core, camel-jbang - collapse identical repeated errors in the error 
> registry and in camel_get_log
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24911
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24911
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-jbang
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> When a route fails the same way for every message, the log and the error 
> registry fill with identical entries: in one step of the camel-jbang-mcp 
> stepwise benchmark a file consumer replayed three orders on every reload and 
> each line failed the same HTTP call, giving 264 entries in the error 
> registry, 132 of them for one URL, each with a full stack trace and message 
> history. A model then reads 60 log records and sees nothing but repeats of 
> one failure; a person tailing a dev log has the same problem.
> Collapse them: the error registry keeps one entry per (route, node, 
> exception, message) with a count, first and last time, instead of one per 
> exchange, and {{camel_get_log}} / {{camel get log}} folds identical 
> consecutive records into one line with "(x132, 16:09:28 to 16:10:43)". The 
> individual exchanges stay available (the console's detail view, 
> {{camel_get_errors}} with a limit), only the default answer is folded.
> Related: CAMEL-24863 made the registry mark a copy handled when the original 
> recovers; this is the volume side of the same data.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to