feat(ops): 添加上游错误事件数据库表
- 新建ops_upstream_error_events表存储上游服务错误详情 - 记录上游错误的请求ID、平台、模型、状态码等信息 - 支持索引优化查询性能(request_id, platform, status_code, created_at)
This commit is contained in:
9
backend/migrations/034_ops_upstream_error_events.sql
Normal file
9
backend/migrations/034_ops_upstream_error_events.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Add upstream error events list (JSONB) to ops_error_logs for per-request correlation.
|
||||
--
|
||||
-- This is intentionally idempotent.
|
||||
|
||||
ALTER TABLE ops_error_logs
|
||||
ADD COLUMN IF NOT EXISTS upstream_errors JSONB;
|
||||
|
||||
COMMENT ON COLUMN ops_error_logs.upstream_errors IS
|
||||
'Sanitized upstream error events list (JSON array), correlated per gateway request (request_id/client_request_id); used for per-request upstream debugging.';
|
||||
Reference in New Issue
Block a user