Repository navigation
修复 MonkeyAI 错误日志丢失并移除聚合 - #1455
Merged
Merged
Conversation
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.
重复故障原先会被去重窗口压成摘要,错误字段又只保留分类,导致无法从日志定位实际原因。本次删除日志聚合、指纹策略、定时摘要及相关环境配置,改为逐条输出完整错误文本,保留请求关联、源码位置和动态日志级别。
同时检查并补齐 MonkeyAI 后端的错误处理:错误向上传递,或在转为固定响应、降级处理、后台任务、计费补偿、状态更新、事务回滚和资源清理时记录原始原因。HTTP 运行时错误与 panic 保留原文;日志输出失败回退到 stderr。正常的事务已关闭、临时文件已清理状态显式识别。
验证:
go test -race ./...go vet ./...go run github.com/kisielk/errcheck@v1.30.0 -blank -ignoretests ./...go run ./tools/sqlcschema -check上述检查已通过。当前环境未提供专项数据库、对象存储、浏览器和容器配置,相关集成测试按既有条件跳过。
错误文本按原文记录,可能包含来源携带的 URL 或路径;重复故障不再被压制,日志保留量由现有容器轮转控制。移除了
logging.Runtime、去重配置与ParseLogging,调用方需改用logging.New和ParseLogLevel;Pro 的对应调整见 https://github.com/chaitin/MonkeyCodePro/pull/194 ,先合并本 PR,再合并 Pro PR。