feat: add agent stats for different connection types (#6412)

This allows us to track when our extensions are used, when the
web terminal is used, and average connection latency to the agent.
This commit is contained in:
Kyle Carberry
2023-03-02 08:06:00 -06:00
committed by GitHub
parent 537547fcc3
commit 2ff1c6d613
18 changed files with 412 additions and 131 deletions
+6 -1
View File
@@ -474,7 +474,12 @@ CREATE TABLE workspace_agent_stats (
rx_packets bigint DEFAULT 0 NOT NULL,
rx_bytes bigint DEFAULT 0 NOT NULL,
tx_packets bigint DEFAULT 0 NOT NULL,
tx_bytes bigint DEFAULT 0 NOT NULL
tx_bytes bigint DEFAULT 0 NOT NULL,
connection_median_latency_ms bigint DEFAULT '-1'::integer NOT NULL,
session_count_vscode bigint DEFAULT 0 NOT NULL,
session_count_jetbrains bigint DEFAULT 0 NOT NULL,
session_count_reconnecting_pty bigint DEFAULT 0 NOT NULL,
session_count_ssh bigint DEFAULT 0 NOT NULL
);
CREATE TABLE workspace_agents (