Skip to content

Add Router troubleshoot playbook and enhance trace analyzer and reporting - #18

Merged
mouxinqq merged 1 commit into
developfrom
codex/modify-troubleshoot-skills-in-golang_router
Apr 13, 2026
Merged

mouxinqq merged 1 commit into
developfrom
codex/modify-troubleshoot-skills-in-golang_router

Conversation

@mouxinqq

Copy link
Copy Markdown
Owner

Motivation

  • 提供一套基于“日志定位 + troubleshoot skill”的可落地故障排查流程,便于快速从现象定位到日志证据与处理建议。
  • 丰富 trace 分析能力以支持更完整的事件链取证(包含原始行、ID 覆盖统计与标签组合分析)。
  • 让交互式技能文档与脚本使用说明更加明确,改善用户在选择范围与分析模式时的提示。

Description

  • 新增文档 docs/zh/online_serving/router_troubleshoot_playbook.md,提供排查流程、命令模板与现象到日志的快速映射。
  • 在 docs/zh/online_serving/router_faq.md 中增加到新排查手册的引用链接。
  • 更新 .claude/skills/troubleshoot/SKILL.md,增强 AskUserQuestion 选项的说明并提示 trace_id/request_id/session_id 的输入方式。
  • 扩展 trace 分析脚本 scripts/analyzers/trace.py:在事件对象中保留 raw 行;新增 _detect_matched_tags、_format_matched_tag、_build_id_coverage_stats、_build_id_combo_stats 等辅助函数;在返回结构中增加 matched_tags、id_coverage 和 id_combos;并在 format_trace_report 中把 ID 覆盖统计、标签组合明细与每条事件的 RAW 行输出到 detail 报告。
  • 在 scripts/troubleshoot.py 中补充时间范围处理变量初始化并改进对 --tail 与 --start/--end 的互斥与过滤行为提示。

Testing

  • 运行了脚本帮助命令 python3 .claude/skills/troubleshoot/scripts/troubleshoot.py --help 以验证 CLI 参数未破坏,执行成功。
  • 对示例日志执行了基本烟雾测试 python3 .claude/skills/troubleshoot/scripts/troubleshoot.py <log_file> --trace <ID> --tail 1000,确认生成的报告包含 matched_tag、id_coverage、id_combos 与事件 RAW 行,测试通过。
  • 未新增自动化单元测试。

Codex Task

@mouxinqq
mouxinqq merged commit 53ef365 into develop Apr 13, 2026
20 of 25 checks passed

This branch had an error being deployed

1 failed deployment
Metax_ci — e03b69f5 Deployed Apr 13, 2026 by mouxinqq via Trigger Jenkins for PR #27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant