SuperAPI AI 工具集

openclaw-request-rca

通用与其它

查看项目

更新于 10-15 20:32

技能介绍

用途:对 OpenClaw 请求做聚焦根因分析,回答请求是失败、缓慢还是健康但退化,定位责任阶段(ingress、openclaw_request 封装、agent_run 运行时、下游工具/模型/IO、平台依赖),给出证据、短期缓解与长期修复,并始终包含 R.E.D(Rate、Errors、Duration)维度。

主要能力:通过 span 标签 otel.scope.name=openclaw-otel-plugin 隔离 OpenClaw span,识别 trace 命名空间与服务;查询错误 span、慢 span(阈值 >1s、>3s、>10s);比较同一 trace 中 channel_ingress、openclaw_request、agent_run 及子 span 的耗时;结合 Pod、告警、gateway 日志等平台侧信号进行关联;按症状分类(直接失败、慢请求、Agent 瓶颈、Ingress 瓶颈、平台相关退化、无流量),并给出高/中/低置信度。

使用方式:优先使用捆绑采集器单条命令获取聚合 NDJSON:python3 scripts/collect_rca.py 24 1s(参数为回溯小时数、慢阈值、可选集群名)。深度 RCA 可用 OPENCLAW_RCA_DETAIL=1 python3 scripts/collect_rca.py 24 1s '<cluster-name>'。脚本仅需 python3 与 dce,首轮采集预算 8 秒、单条 DCE 命令 5 秒超时。直接查询需用 dce -o json 并附带必需标签过滤器:{"key": "otel.scope.name", "operation": "EQUAL", "value": "openclaw-otel-plugin"}。其他命令包括 dce container-management cluster list-clusters、dce insight tracing query-spans、get-services、query-operations、get-operation-detail、find-jaeger-trace、dce insight resource list-pods/get-pod、dce insight alert list-alerts、dce container-management insight get-pod-container-log 等。仅在用户明确要求深入 RCA 或提供 trace ID 时才拉取 trace 详情或日志。

适用场景:OpenClaw 请求报错、超时或延迟排查,需跨追踪、指标、告警、日志与 Pod 关联定位根因时。

限制:只有带 otel.scope.name=openclaw-otel-plugin 的 span 才算 OpenClaw 证据,命名空间/服务/操作名或时间重叠不足;onlyErrorSpans=true 返回 0 只表示未发现直接错误 span,不代表无故障;平台侧失败仅在 trace 显示依赖或时间路径吻合时才归因;正常路径最多查询 12 个 trace-service 命名空间;若 agent_run 下无子 span,需先补充埋点再断言具体依赖;无 OpenClaw span 时应低置信度回答,不自动扩大窗口或扫描全部命名空间。其他收费、平台与版本信息暂未提供。