Add observability metrics logs and Grafana provisioning

This commit is contained in:
2026-11-20 19:12:20 +03:00
parent 470d9d6f1e
commit ac2d74b74a
33 changed files with 1408 additions and 29 deletions
+3
View File
@@ -0,0 +1,3 @@
ALTER TABLE attachments ALTER COLUMN status SET DEFAULT 'queued';
CREATE TABLE attachment_jobs (attachment_id uuid PRIMARY KEY REFERENCES attachments(id), pipeline_version integer NOT NULL DEFAULT 1, attempts integer NOT NULL DEFAULT 0, available_at timestamptz NOT NULL DEFAULT clock_timestamp(), locked_until timestamptz, last_error text, created_at timestamptz NOT NULL DEFAULT clock_timestamp(), completed_at timestamptz);
CREATE INDEX attachment_jobs_ready ON attachment_jobs(available_at) WHERE completed_at IS NULL;