1. 14 Jan, 2026 2 commits
  2. 11 Jan, 2026 3 commits
    • IanShaw027's avatar
      fix(lint): 修复所有golangci-lint错误 · 54c5788b
      IanShaw027 authored
      - 修复depguard错误:为ops service文件添加redis导入例外
      - 修复errcheck错误:添加错误检查和类型断言检查
      - 修复gofmt错误:格式化代码
      - 修复ineffassign错误:移除无效的idx++赋值
      - 修复staticcheck错误:合并条件赋值
      - 修复unused错误:移除未使用的字段和函数
        - ops_cleanup_service.go: entryID字段
        - ops_retry.go: status字段
        - ops_upstream_context.go: getOpsUpstreamErrors函数
      54c5788b
    • IanShaw027's avatar
      feat(ops): 实现上游错误事件记录与查询功能 · 7ebca553
      IanShaw027 authored
      **新增功能**:
      - 新建ops_upstream_error_events表存储上游服务错误详情
      - 支持记录上游429/529/5xx错误的详细上下文信息
      - 提供按时间范围查询上游错误事件的API
      
      **后端改动**:
      1. 模型层(ops_models.go, ops_port.go):
         - 新增UpstreamErrorEvent结构体
         - 扩展Repository接口支持上游错误事件CRUD
      
      2. 仓储层(ops_repo.go):
         - 实现InsertUpstreamErrorEvent写入上游错误
         - 实现GetUpstreamErrorEvents按时间范围查询
      
      3. 服务层(ops_service.go, ops_upstream_context.go):
         - ops_service: 新增GetUpstreamErrorEvents查询方法
         - ops_upstream_context: 封装上游错误上下文构建逻辑
      
      4. Handler层(ops_error_logger.go):
         - 新增GetUpstreamErrorsHandler处理上游错误查询请求
      
      5. Gateway层集成:
         - antigravity_gateway_service.go: 429/529错误时记录上游事件
         - gateway_service.go: OpenAI 429/5xx错误时记录
         - gemini_messages_compat_service.go: Gemini 429/5xx错误时记录
         - openai_gateway_service.go: OpenAI 429/5xx错误时记录
         - ratelimit_service.go: 429限流错误时记录
      
      **数据记录字段**:
      - request_id: 关联ops_logs主记录
      - platform/model: 上游服务标识
      - status_code/error_message: 错误详情
      - request_headers/response_body: 调试信息(可选)
      - created_at: 错误发生时间
      7ebca553
    • IanShaw027's avatar
      feat(ops): 添加QPS脉搏线图并优化指标布局 · 89a725a4
      IanShaw027 authored
      - 添加实时QPS/TPS历史数据追踪(最近60个数据点)
      - 在平均QPS/TPS上方添加SVG脉搏线图(sparkline)
      - 将延迟和TTFT卡片的指标布局从2列改为3列
      - 恢复Max指标显示(P95/P90/P50/Avg/Max)
      89a725a4