[Feature] Add skills and logging cleanup#7362
Open
mouxinqq wants to merge 73 commits intoPaddlePaddle:developfrom
Open
[Feature] Add skills and logging cleanup#7362mouxinqq wants to merge 73 commits intoPaddlePaddle:developfrom
mouxinqq wants to merge 73 commits intoPaddlePaddle:developfrom
Conversation
Enhance log parsing and troubleshoot analysis: robust URL handling, tail-by-minutes, improved select/release matching and reporting
Improve log parsing, URL handling, and detailed reporting for router troubleshooting skills
Enhance stat-cache-hitrate reports with legends and file:// links (path quoting)
…-path Add session-level analysis and window-merging to stat-cache-hitrate skill
…-path-siyzne stat-cache-hitrate: add session-level analysis and window merge compression
…-settings Improve stat-cache-hitrate UX and normalize Total Running metric
…io-structure Improve report readability and preserve run details with timestamped summary/detail folders
…io-structure-m2lbgv Split report outputs into summary/detail, add session_id fallback and markdown report improvements
…-markdown-summary Improve stat-cache-hitrate session details formatting
…o-markdown-summary-2h7tlo Add time-range selection and improve session reports and table rendering for stat-cache-hitrate
…o-markdown-summary-j1wwvx Enhance session reporting and table rendering; add time-range selection in skill metadata
…ser-input Refactor load analyzer: extract report formatter, improve token/select-release parsing and worker-type handling
…cleanup test(golang_router): add cleanup and cross-day rolling coverage for logger
fastdeploy-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review |
2026-04-14
📋 Review 摘要
PR 概述:新增日志滚动清理功能和两个诊断 skills,提升生产环境运维效率
变更范围:pkg/logger、cmd/main.go、internal/config、docs、.claude/skills
📝 PR 规范检查
PR 标题和描述符合规范:
- 标题包含
[Feature]Tag - 描述包含 Motivation 和 Modifications
问题
未发现阻塞性问题。
总体评价
代码实现质量良好,日志滚动和清理功能设计合理,跨天日志的 grace period 机制确保日志连续性。测试覆盖充分,包括日志级别、Context 前缀、parseLogDate、StartLogCleanup、跨天 rolling 等测试用例。两个诊断 skills(stat-cache-hitrate 和 troubleshoot)提供了实用的 cache 命中率统计和综合问题排查能力。文档更新完整,中英文 FAQ 文档同步补充了新增错误日志说明。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
生产环境运行时需要自动清理过期日志文件,避免磁盘占用过多;同时需要统计 cache 命中率和综合问题排查能力,提升运维效率。
Modifications
日志滚动和清理功能:
rotatingWriter支持按天自动滚动日志文件StartLogCleanup定期清理过期日志(基于天数和总大小)配置项新增:
log.max-age-days:日志保留天数,默认 7 天log.max-total-size-mb:日志总大小限制(MB),默认 500MBlog.cleanup-interval-secs:清理检查间隔,默认 3600 秒诊断 Skills:
stat-cache-hitrate:统计三层 cache 命中率(Prefix Hit Ratio、Session Hit Rate、Per-Worker Stats)troubleshoot:综合问题排查(错误分类、延迟分析、健康状态、负载分析、请求追踪)文档更新:更新中英文 FAQ 文档,补充新增日志说明和错误信息