mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-06-28 08:49:38 -04:00
8f42f83663
# Description of Changes
Adds a Prometheus counter for websocket clients that are disconnected
after the server considers them idle:
-
`spacetime_worker_ws_clients_idle_timed_out_total{database_identity=...}`
The counter is incremented at the existing websocket idle-timeout
disconnect path, next to the `Client ... timed out` log.
# API and ABI breaking changes
None.
# Expected complexity level and risk
1. This is instrumentation-only and does not change websocket behavior.
# Testing
- [x] `rustup run 1.93.0 rustfmt
crates/client-api/src/routes/subscribe.rs
crates/core/src/worker_metrics/mod.rs`
- [x] `git diff --check`
- [x] `LC_ALL=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8
RUSTC=/Users/clockworklabs/.rustup/toolchains/1.93.0-aarch64-apple-darwin/bin/rustc
rustup run 1.93.0 cargo check -p spacetimedb-client-api -p
spacetimedb-core`
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Tyler Cloutier <cloutiertyler@users.noreply.github.com>
⚠️ Internal Crate ⚠️
This crate is intended for internal use only. It is not stable and may change without notice.