davsclaus opened a new pull request, #26754:
URL: https://github.com/apache/camel/pull/26754

   A burst of the same failure (a down endpoint, a bad message repeated by a 
consumer) used to fill the error registry with hundreds of near identical 
entries — evicting every other error — and to flood the log window an AI agent 
reads through `camel_get_log`.
   
   Errors are now counted per **kind**: same route, node, exception type and 
exception message. Only the newest few exchanges of a kind are kept, while the 
counter for that kind keeps rising (132 … 147 … 188), also after its older 
entries were evicted. A storm therefore shows as one growing number instead of 
pushing every other error out of the registry.
   
   - `BacklogErrorEventMessage` gains `getRepeatCount()`, 
`getRepeatFirstTimestamp()`, `getRepeatLastTimestamp()` (@since 4.23); they are 
only written to the JSON when the error actually repeated
   - `maximumEntriesPerKind` (default 3) on the `ErrorRegistry` SPI, the JMX 
mbean and `camel.main.errorRegistry.maximumEntriesPerKind`; counters are 
bounded to 100 kinds, the least recently seen aging out
   - the `errors` dev console prints `Repeated: N times (first: …, last: …)` 
and `camel get errors` has a COUNT column (blank when the error happened once)
   - `camel_get_log` folds a run of identical consecutive log records into one 
record with `repeated` and `firstTime`
   
   Tests: `ErrorRegistryRepeatTest` (a storm of 30 keeps 3 entries with counts 
30/29/28 while an unrelated error survives a registry limited to 10) and 
`LogFileReaderTest.foldsAStormOfTheSameLineIntoOneRecord`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to