- 新建ops_upstream_error_events表存储上游服务错误详情 - 记录上游错误的请求ID、平台、模型、状态码等信息 - 支持索引优化查询性能(request_id, platform, status_code, created_at)
10 lines
424 B
SQL
10 lines
424 B
SQL
-- 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.';
|