feat(api hits): added in api hits for monitoring

This commit is contained in:
2026-05-08 15:03:03 -05:00
parent 4424c742d2
commit 2721bb2a3b
5 changed files with 2386 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE "analytics_daily" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"business_date" date NOT NULL,
"method" text NOT NULL,
"route_pattern" text NOT NULL,
"module" text NOT NULL,
"total_hits" integer NOT NULL,
"unique_users" integer NOT NULL,
"success_count" integer NOT NULL,
"error_count" integer NOT NULL,
"avg_duration_ms" integer NOT NULL,
"max_duration_ms" integer NOT NULL,
"first_hit_at" timestamp NOT NULL,
"last_hit_at" timestamp NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL
);