Skip to content

Stop headless monitoring from accumulating unused replay events - #155

Merged
lance0 merged 1 commit into
masterfrom
fix/headless-event-retention
Oct 16, 2026
Merged

lance0 merged 1 commit into
masterfrom
fix/headless-event-retention

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

A long-running ttl --daemon --prometheus :9090 target records every reply/timeout into Session.events, even though no event consumer drains that history. Memory grows with completed probes rather than just the displayed statistics.

Configure headless recording before starting receivers: Prometheus-only, plain daemon and plain --no-tui runs retain aggregate statistics without replay history. JSON streams still record and drain events; TUI and batch JSON recording keep their existing behavior. The policy is runtime-only, releases already allocated history when disabled, and survives statistics resets.

Validation: full build/tests/clippy/fmt/doc checks and Rust 1.88 all-target check pass. A regression simulates one million completed probes in 0.03 s, verifies zero event-buffer allocation and all one million timeout counts, and checks reset behavior. Additional tests cover headless/stream selection and old-session serialization compatibility. This bounds replay-history growth; it does not impose a new limit on distinct responders during route churn.

@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:38
@lance0
lance0 merged commit 51cabf9 into master Oct 16, 2026
6 checks passed
@lance0
lance0 deleted the fix/headless-event-retention branch October 16, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant