Add CountSessions to summarise mux session state - #257
Open
liam-lowe wants to merge 1 commit into
Open
Conversation
liam-lowe
force-pushed
the
liam-lowe/mux-session-counts
branch
from
August 21, 2026 00:55
6bc3014 to
2e348f3
Compare
liam-lowe
force-pushed
the
liam-lowe/mux-session-counts
branch
from
August 24, 2026 18:57
2e348f3 to
d938b71
Compare
Nothing reports the breakdown of a mux manager's sessions. num_muxes_active is the size of the session map. mux_connection_active is per session. A session failing its health check but still in the map therefore reads as healthy in both. CountSessions returns connected, errored, closed and total. Connected against Total is the signal a caller wants: a manager holding one of ten sessions is in a very different state from one holding ten. The manager's existing once-a-minute status line now carries those counts. SessionCounts renders itself, so the counts are one tag rather than four, and the rendering is unit tested even though the log call is not. This also repairs the NewGRPCMuxManager doc comment. DesiredMuxCount was inserted between that comment and its function. Its first two lines ended up documenting DesiredMuxCount instead.
liam-lowe
force-pushed
the
liam-lowe/mux-session-counts
branch
from
August 24, 2026 19:03
d938b71 to
c34c1b7
Compare
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
We need more detail to breakdown state of a mux manager's sessions.
Introduces
CountSessionswhich returns a breakdown: connected, errored, closed and total.The manager's existing once-a-minute
"MuxManager status"log line prints these. In future, these will be used for across-group aggregation of state.It will log:
Where connected is logging: connected / total - and the remaining indicates the state of non-connected muxes.