File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ) ]
You can’t perform that action at this time.
0 commit comments