feat: add coderd_api_websocket_probes_total metric (#25012)

Relates to CODAGT-115

Adds metric `coderd_api_websocket_probes_total`. Every successful
heartbeat for a given path will increment the metric.

Comparing this with `coderd_api_concurrent_websockets` will give an
indication of how many websocket connections are open but in a 'wedged'
state (when heartbeats stopped versus when we closed the connection).
This commit is contained in:
Cian Johnston
2026-06-03 10:46:07 +01:00
committed by GitHub
parent 7703e7a26e
commit 8b058dc949
22 changed files with 596 additions and 171 deletions
+3
View File
@@ -214,6 +214,9 @@ coderd_api_total_user_count{status=""} 0
# HELP coderd_api_websocket_durations_seconds Websocket duration distribution of requests in seconds.
# TYPE coderd_api_websocket_durations_seconds histogram
coderd_api_websocket_durations_seconds{path=""} 0
# HELP coderd_api_websocket_probes_total WebSocket liveness probe outcomes by route. Compare rate(...{result=\"ok\"}[1m]) against coderd_api_concurrent_websockets to detect unresponsive WebSocket connections.
# TYPE coderd_api_websocket_probes_total counter
coderd_api_websocket_probes_total{path="",result=""} 0
# HELP coderd_api_workspace_latest_build The current number of workspace builds by status for all non-deleted workspaces.
# TYPE coderd_api_workspace_latest_build gauge
coderd_api_workspace_latest_build{status=""} 0