Skip to content

Commit cc4cec0

Browse files
author
rain
committed
Merge remote-tracking branch 'origin/master' into bot/docs-audit
2 parents b2e12ab + 8f42f83 commit cc4cec0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

crates/client-api/src/routes/subscribe.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,10 @@ async fn ws_main_loop<HotswapWatcher>(
669669
// Exit if we haven't heard from the client for too long.
670670
_ = &mut idle_timer => {
671671
log::warn!("Client {} timed out", state.client_id);
672+
WORKER_METRICS
673+
.ws_clients_idle_timed_out
674+
.with_label_values(&state.database)
675+
.inc();
672676
break;
673677
},
674678

crates/core/src/worker_metrics/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ metrics_group!(
3636
#[labels(database_identity: Identity)]
3737
pub ws_clients_closed_connection: IntGaugeVec,
3838

39+
#[name = spacetime_worker_ws_clients_idle_timed_out_total]
40+
#[help = "The cumulative number of ws client connections disconnected after becoming idle"]
41+
#[labels(database_identity: Identity)]
42+
pub ws_clients_idle_timed_out: IntCounterVec,
43+
3944
#[name = spacetime_websocket_requests_total]
4045
#[help = "The cumulative number of websocket request messages"]
4146
#[labels(database_identity: Identity, protocol: str)]

0 commit comments

Comments
 (0)