Skip to content

metrics: disambiguate websocket receive disconnects#5547

Merged
clockwork-labs-bot merged 2 commits into
masterfrom
bot/disambiguate-disconnect-recv-errors
Jul 17, 2026
Merged

metrics: disambiguate websocket receive disconnects#5547
clockwork-labs-bot merged 2 commits into
masterfrom
bot/disambiguate-disconnect-recv-errors

Conversation

@clockwork-labs-bot

Copy link
Copy Markdown
Contributor

Description of Changes

Adds specific ClientDisconnectCause variants for each websocket receive WsError variant, and records those specific causes in the subscribe route instead of collapsing all receive failures into websocket_receive_error.

The legacy WebsocketReceiveError enum variant and metric label are retained, but the receive loop now emits the more specific labels.

API and ABI breaking changes

This adds public Rust enum variants and new metric label values. Existing variants are retained.

Expected complexity level and risk

1

This is an observability-only change. Websocket control flow is unchanged.

Testing

  • cargo fmt --all -- --check
  • cargo test -p spacetimedb-core client_disconnect_cause_labels_are_unique
  • cargo test -p spacetimedb-client-api recv_loop_terminates_when_input_yields_err

@clockwork-labs-bot
clockwork-labs-bot added this pull request to the merge queue Jul 17, 2026
Merged via the queue into master with commit 3c87e69 Jul 17, 2026
43 checks passed
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.

2 participants