Добавил наблюдаемость: OpenTelemetry, Prometheus, Loki, Tempo, Grafana

This commit is contained in:
gera
2026-11-19 23:10:55 +03:00
parent 470d9d6f1e
commit 4adc6c58c8
77 changed files with 8031 additions and 16 deletions
+22
View File
@@ -0,0 +1,22 @@
create table attachments (
id uuid primary key,
chat_id uuid not null references chats(id),
owner_id uuid not null references users(id),
filename text not null,
content_type text not null,
size_bytes bigint not null,
sha256 text not null,
object_key text not null unique,
created_at timestamptz not null
);
create index attachments_chat_idx on attachments (chat_id);
create table message_attachments (
message_id uuid not null references messages(id),
attachment_id uuid not null references attachments(id),
position int not null,
primary key (message_id, attachment_id)
);
create index message_attachments_attachment_idx on message_attachments (attachment_id);