Repository navigation
Conversation
…MB, and camel trace and the TUI follow the new file While tracing is on, the connector appended every trace to ~/.camel/<pid>-trace.json without a limit: 758 KB after ten minutes of a 2 s timer, about 15 MB a minute at 100 exchanges a second, and camel trace reads it whole for --tail. When the file would grow past 10 MB, the connector now deletes it and the traces start a new file. camel trace (follow) and the trace view of the TUI see the file become smaller and read the new file from its start; the TUI read nothing from it again before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
🔄 Backport BotThis bugfix targets
Add a Backport PRs will be created automatically on merge (once a port label is added). Comment ℹ️ If you push additional commits after |
|
🧪 CI tested the following changed modules:
🔁 1 test passed only after a retry on JDK 21 (1 retried attempt) Recovered flaky tests on JDK 21 (1)
🔬 Scalpel shadow comparison — Scalpel: 10 of 726 tested, 22 compile-only — current: 10 all testedMaveniverse Scalpel detected 10 affected modules (current approach: 10). Skip-tests mode would test 10 modules (4 direct + 8 downstream), skip tests for 22 (generated code, meta-modules) Modules Scalpel would test (10)
Modules with tests skipped (22)
💡 Manual integration tests recommended:
All tested modules (34 modules, 5m 40s total)Total reactor time: 5m 40s
Top 20 slowest modules:
|
JIRA: CAMEL-26929, item 6.
The problem
While tracing is on,
FileCliConnectorTransportappends the new traces to~/.camel/<pid>-trace.json, and nothing ever trims the file: 758 KB after ten minutes of a 2 s timer, and about 15 MB a minute at 100 exchanges/s.camel trace --tailreads it whole every time.The change
MAX_TRACE_FILE_SIZE), the file is deleted and the traces start a new one. A single snapshot larger than that is still written to an empty file.camel trace(follow): a file that got smaller than when it was last read is a new file, so the reader reopens it and reads it from its start. Before, the open reader stayed on the deleted file.length <= lastPosreturned early, so the view never read the file again.An older CLI or TUI that follows the file of a newer integration stops seeing new traces after the first new file, until it is started again. That only happens after 10 MB of traces.
Tests and docs
TraceFileSizeTest(connector): a full file starts again, a file with room is appended to, and an empty file takes data larger than the maximum.CamelTraceActionTest.aTraceFileThatGotSmallerIsANewFileandDataRefreshMembershipTest.aTraceFileThatGotSmallerIsReadFromItsStart.cli-connector.adocdescribes the trace file; the catalog copy is updated.Not checked end to end: it needs 10 MB of traces.
Claude Code on behalf of davsclaus
🤖 Generated with Claude Code