mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Daily Active User Metrics (#3735)
* agent: add StatsReporter * Stabilize protoc
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DROP TABLE agent_stats;
|
||||
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE agent_stats (
|
||||
id uuid NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
created_at timestamptz NOT NULL,
|
||||
user_id uuid NOT NULL,
|
||||
agent_id uuid NOT NULL,
|
||||
workspace_id uuid NOT NULL,
|
||||
template_id uuid NOT NULL,
|
||||
payload jsonb NOT NULL
|
||||
);
|
||||
|
||||
-- We use created_at for DAU analysis and pruning.
|
||||
CREATE INDEX idx_agent_stats_created_at ON agent_stats USING btree (created_at);
|
||||
|
||||
-- We perform user grouping to analyze DAUs.
|
||||
CREATE INDEX idx_agent_stats_user_id ON agent_stats USING btree (user_id);
|
||||
Reference in New Issue
Block a user