@spfn/monitor 0.1.0-beta.2 → 0.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ declare const monitorEnvSchema: {
|
|
|
9
9
|
required: boolean;
|
|
10
10
|
examples: string[];
|
|
11
11
|
type: "string";
|
|
12
|
+
validator: (value: string) => string;
|
|
12
13
|
} & {
|
|
13
14
|
key: "SPFN_MONITOR_SLACK_WEBHOOK_URL";
|
|
14
15
|
};
|
|
@@ -50,6 +51,7 @@ declare const env: _spfn_core_env.InferEnvType<{
|
|
|
50
51
|
required: boolean;
|
|
51
52
|
examples: string[];
|
|
52
53
|
type: "string";
|
|
54
|
+
validator: (value: string) => string;
|
|
53
55
|
} & {
|
|
54
56
|
key: "SPFN_MONITOR_SLACK_WEBHOOK_URL";
|
|
55
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
CREATE SCHEMA "spfn_monitor";
|
|
1
|
+
CREATE SCHEMA IF NOT EXISTS "spfn_monitor";
|
|
2
2
|
--> statement-breakpoint
|
|
3
|
-
CREATE TABLE "spfn_monitor"."error_events" (
|
|
3
|
+
CREATE TABLE IF NOT EXISTS "spfn_monitor"."error_events" (
|
|
4
4
|
"id" bigserial PRIMARY KEY NOT NULL,
|
|
5
5
|
"group_id" bigserial NOT NULL,
|
|
6
6
|
"request_id" text,
|
|
@@ -14,7 +14,7 @@ CREATE TABLE "spfn_monitor"."error_events" (
|
|
|
14
14
|
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
15
15
|
);
|
|
16
16
|
--> statement-breakpoint
|
|
17
|
-
CREATE TABLE "spfn_monitor"."error_groups" (
|
|
17
|
+
CREATE TABLE IF NOT EXISTS "spfn_monitor"."error_groups" (
|
|
18
18
|
"id" bigserial PRIMARY KEY NOT NULL,
|
|
19
19
|
"fingerprint" text NOT NULL,
|
|
20
20
|
"name" text NOT NULL,
|
|
@@ -32,7 +32,7 @@ CREATE TABLE "spfn_monitor"."error_groups" (
|
|
|
32
32
|
CONSTRAINT "error_groups_fingerprint_unique" UNIQUE("fingerprint")
|
|
33
33
|
);
|
|
34
34
|
--> statement-breakpoint
|
|
35
|
-
CREATE TABLE "spfn_monitor"."logs" (
|
|
35
|
+
CREATE TABLE IF NOT EXISTS "spfn_monitor"."logs" (
|
|
36
36
|
"id" bigserial PRIMARY KEY NOT NULL,
|
|
37
37
|
"level" text NOT NULL,
|
|
38
38
|
"message" text NOT NULL,
|
|
@@ -44,14 +44,19 @@ CREATE TABLE "spfn_monitor"."logs" (
|
|
|
44
44
|
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
45
45
|
);
|
|
46
46
|
--> statement-breakpoint
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
CREATE INDEX "
|
|
54
|
-
CREATE INDEX "
|
|
55
|
-
CREATE INDEX "
|
|
56
|
-
CREATE INDEX "
|
|
57
|
-
CREATE INDEX "
|
|
47
|
+
DO $$ BEGIN
|
|
48
|
+
IF NOT EXISTS (SELECT 1 FROM pg_constraint WHERE conname = 'error_events_group_id_error_groups_id_fk') THEN
|
|
49
|
+
ALTER TABLE "spfn_monitor"."error_events" ADD CONSTRAINT "error_events_group_id_error_groups_id_fk" FOREIGN KEY ("group_id") REFERENCES "spfn_monitor"."error_groups"("id") ON DELETE cascade ON UPDATE no action;
|
|
50
|
+
END IF;
|
|
51
|
+
END $$;
|
|
52
|
+
--> statement-breakpoint
|
|
53
|
+
CREATE INDEX IF NOT EXISTS "monitor_ee_group_id_idx" ON "spfn_monitor"."error_events" USING btree ("group_id");--> statement-breakpoint
|
|
54
|
+
CREATE INDEX IF NOT EXISTS "monitor_ee_created_at_idx" ON "spfn_monitor"."error_events" USING btree ("created_at");--> statement-breakpoint
|
|
55
|
+
CREATE INDEX IF NOT EXISTS "monitor_ee_user_id_idx" ON "spfn_monitor"."error_events" USING btree ("user_id");--> statement-breakpoint
|
|
56
|
+
CREATE INDEX IF NOT EXISTS "monitor_eg_fingerprint_idx" ON "spfn_monitor"."error_groups" USING btree ("fingerprint");--> statement-breakpoint
|
|
57
|
+
CREATE INDEX IF NOT EXISTS "monitor_eg_status_idx" ON "spfn_monitor"."error_groups" USING btree ("status");--> statement-breakpoint
|
|
58
|
+
CREATE INDEX IF NOT EXISTS "monitor_eg_last_seen_at_idx" ON "spfn_monitor"."error_groups" USING btree ("last_seen_at");--> statement-breakpoint
|
|
59
|
+
CREATE INDEX IF NOT EXISTS "monitor_eg_path_idx" ON "spfn_monitor"."error_groups" USING btree ("path");--> statement-breakpoint
|
|
60
|
+
CREATE INDEX IF NOT EXISTS "monitor_log_level_idx" ON "spfn_monitor"."logs" USING btree ("level");--> statement-breakpoint
|
|
61
|
+
CREATE INDEX IF NOT EXISTS "monitor_log_source_idx" ON "spfn_monitor"."logs" USING btree ("source");--> statement-breakpoint
|
|
62
|
+
CREATE INDEX IF NOT EXISTS "monitor_log_created_at_idx" ON "spfn_monitor"."logs" USING btree ("created_at");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spfn/monitor",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Error tracking, log management, and monitoring dashboard for SPFN",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@spfn/auth": "0.2.0-beta.
|
|
63
|
-
"@spfn/notification": "0.1.0-beta.
|
|
64
|
-
"@spfn/core": "0.2.0-beta.
|
|
62
|
+
"@spfn/auth": "0.2.0-beta.22",
|
|
63
|
+
"@spfn/notification": "0.1.0-beta.8",
|
|
64
|
+
"@spfn/core": "0.2.0-beta.20"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@sinclair/typebox": "^0.34.30",
|