Implement bounded OTLP observability across API and asynchronous image pipeline

This commit is contained in:
2026-11-15 22:30:03 +03:00
parent 470d9d6f1e
commit 2701db5106
60 changed files with 6118 additions and 49 deletions
+13
View File
@@ -0,0 +1,13 @@
-- PostgreSQL text rejects U+0000, while the API accepts Unicode code points.
-- Preserve UTF-8 losslessly. API validation enforces code point limits; the DB
-- additionally bounds byte lengths, without stripping or replacing characters.
ALTER TABLE users DROP CONSTRAINT users_display_name_check;
ALTER TABLE users ALTER COLUMN display_name TYPE bytea USING convert_to(display_name,'UTF8');
ALTER TABLE users ADD CHECK (octet_length(display_name) BETWEEN 1 AND 400);
ALTER TABLE chats DROP CONSTRAINT chats_title_check;
ALTER TABLE chats ALTER COLUMN title TYPE bytea USING convert_to(title,'UTF8');
ALTER TABLE chats ADD CHECK (octet_length(title) BETWEEN 1 AND 400);
ALTER TABLE messages DROP CONSTRAINT messages_text_check;
ALTER TABLE messages ALTER COLUMN text TYPE bytea USING convert_to(text,'UTF8');
ALTER TABLE messages ADD CHECK (octet_length(text) BETWEEN 1 AND 16000);
ALTER TABLE message_requests ALTER COLUMN response TYPE bytea USING convert_to(response::text,'UTF8');