Repository navigation
Replace distribution health ratios with packet observations - #140
Merged
Merged
Conversation
Changes: - Remove the invalid packet-to-byte percentage and derived distribution health labels. - Show packet rates using actual elapsed time, pending packet counts, and three-sample history per connection. - Reset sampling across reconnects, counter resets, and unavailable samples; protect internal OTP probes against failures. - Label the busy limit as an independent byte-valued configuration and document the observation-only semantics. - Add sampling, availability, layout, and live peer reconnection regression tests without changing CLI semantics or installing monitors. Validation: - mise exec -- rebar3 eunit: 800 tests passed on OTP 28. - mise exec erlang@29.0.6 -- rebar3 eunit --module=observer_cli_system_test: 34 tests passed. - mise exec -- rebar3 as ci compile: passed. - mise exec -- rebar3 fmt --check: passed. - git diff --check and git diff --cached --check: passed. - Verified real peer packet activity and reset-on-reconnection output in an OTP 29 terminal session. - Hosted CI and the full OTP compatibility matrix have not been run locally.
Changes: - Remove the fallback clause already excluded by net_kernel:nodes_info/0's return type, fixing Dialyzer failures across OTP 26 through 29. - Preserve the outer exception handler for unavailable distribution information and disappearing resources. Validation: - mise exec -- rebar3 as ci dialyzer: passed on OTP 28 with no warnings. - mise exec -- rebar3 eunit --module=observer_cli_system_test: 34 tests passed. - mise exec -- rebar3 fmt --check: passed. - git diff --check: passed. - The full suite was not rerun locally for this unreachable-clause removal; the hosted matrix will validate the updated commit.
Codecov Report❌ Patch coverage is
❌ Your project check has failed because the head coverage (97.88%) is below the target coverage (98.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #140 +/- ##
==========================================
- Coverage 97.91% 97.88% -0.04%
==========================================
Files 24 24
Lines 7928 7939 +11
==========================================
+ Hits 7763 7771 +8
- Misses 165 168 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The System page treated the fourth
erlang:dist_get_stat/1result (pending output packets) as bytes, divided it bydist_buf_busy_limit, and inferredok/warnhealth. Those quantities cannot produce a meaningful capacity percentage.This PR replaces that inference with useful, explicitly scoped observations:
Rx pkt/sandTx pkt/sfrom packet-counter deltas over actual monotonic elapsed time.Pending pktsand up to three recent observations, oldest to newest. Oversized histories explicitly elide older values instead of truncating the latest observation.Dist busy limit (bytes)independently in runtime configuration.-while establishing a baseline andN/Afor unavailable statistics.Scope and semantics
Packet activity is not application-message throughput, capacity utilization, or a health score. Nonzero pending samples do not prove continuous blocking between samples. The CLI's controller-queue context remains unchanged. This PR does not install system monitors, add backpressure diagnostics, or introduce a controller-queue detail view.
Validation
mise exec -- rebar3 eunit: 800 tests passed on OTP 28.mise exec erlang@29.0.6 -- rebar3 eunit --module=observer_cli_system_test: 34 tests passed, including real peer traffic and reconnect baseline resets.mise exec -- rebar3 as ci compile: passed.mise exec -- rebar3 fmt --check: passed.git diff --checkand staged diff checks: passed.Hosted CI is separate from these local results; the full OTP compatibility matrix was not run locally.