Label player_disconnects_total by reason #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "metric/disconnect-reasons"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a "reason" label to minecraft_player_disconnects_total carrying the
disconnect reason's translation key (e.g. disconnect.timeout,
multiplayer.disconnect.idling, multiplayer.disconnect.kicked). Reasons
without a translation key are bucketed as "other" so cardinality stays
bounded.
The Fabric API DISCONNECT event doesn't expose the reason, so this drops
the event-based listener in favor of a mixin into
ServerCommonPacketListenerImpl.onDisconnect, which carries
DisconnectionDetails. The mixin filters to play-state listeners via an
instanceof check on ServerGamePacketListenerImpl, matching the joins
counter's semantic of "play-state only".
Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com