主要更新内容
- 新增公开访客审计事件 RPC 端点(
public:recordVisitorEvent),需开启visitor_audit_enabled配置项,支持限流和字段规范化 - 移除 Nezha Agent gRPC 兼容层(配置项
nezha_compat_enabled/nezha_compat_listen及关联 proto 代码已删除) - 移除
metric_retention_days全局配置项,指标保留天数改为按定义单独设置(RetentionDays=0表示禁用持久化) - 默认关闭分层降采样(
metric_downsampling_enabled默认值改为false) - 内置指标默认保留期缩短为 1 天(仅影响新建实例的测试阶段)
- 增加 loong64 架构支持(Linux 二进制及安装脚本)
- 删除旧版监控数据缓存模块(
web/report/cache.go)和旧记录写入函数(WriteRecord/WriteGPURecord) - 指标报告改为批量写入(3 秒窗口、单事务提交),提高写入性能
- 删除客户端或 Ping 任务前自动清理关联的 metric store 数据
- 启动时增加 1.2.7 旧版监控数据迁移向导,支持进度显示和旧表清理
- 移除
Tag字段(JSON RPC 公共指标类型),改为 metadata - 添加迁移清理:移除数据库中旧的
metric_retention_days、nezha_compat_*配置项
Bug修复
- 加强访客审计日志的输入验证和限流,防止潜在滥用
- 修复零保留期指标定义在更新操作后数据未被清理的问题
- 修复 Ping 记录读取未使用 Series 接口导致无法处理降采样结果的问题
- 修复内建指标测试保留期过长的问题(改为 1 天)
其他
- 移除
util.SafeMap、secureconfig、ComputeTrafficDelta等废弃工具函数和文件 - 数据库日志表添加复合索引(
idx_logs_msg_type_time、idx_logs_time) - OAuth 初始化重构,启动阶段更清晰的依赖顺序
- 移除冗余的数据库函数(
EditClientName、GetAllTasksResultByUUID等)
What's Changed
- feat(rpc): add public visitor audit event endpoint by @sanrokamlan-prog in #597
- fix: harden visitor audit logging by @sanrokamlan-prog in #602
Commits
- disable downsampling by default (724dd3b) @Akizon77
- feat: add visitor audit rpc endpoint (7679430) @sanrokamlan-prog
- Update generate-release-notes.yml (5c73eba) @Akizon77
- Merge pull request #597 from sanrokamlan-prog/visitor-audit-rpc (1eb3549) @Akizon77
- fix: harden visitor audit logging (0c80f0f) @sanrokamlan-prog
- Merge pull request #602 from sanrokamlan-prog/fix/visitor-audit-hardening (5fa59ab) @Akizon77
- refactor: replace static retention config with dynamic retention summary (7f36881) @Akizon77
- fix: preserve zero-retention metric definitions across operations (66b7691) @Akizon77
- refactor(metrics): remove DefaultRetentionDays config option and enforce explicit retention (7baf2ed) @Akizon77
- fix: reduce default built-in metric retention to 1 day for testing (c1178eb) @Akizon77
- fix(metricstore): use Series to read ping records for rollup support (e2a8284) @Akizon77
- feat: clean metric store before deleting client or ping task (43547b9) @Akizon77
- feat(metric): add compaction watermark upsert and update storage queries (5b90804) @Akizon77
- feat: #414 add support for loong64 architecture (fc3febc) @Akizon77
- refactor: remove unused database functions for sessions, clients, and metric store (0f6f2f4) @Akizon77
- refactor: remove Nezha compatibility (f42cfe7) @Akizon77
- Make metric chart gaps adaptive (73c3c43) @Akizon77
- refactor: remove deprecated WriteRecord/WriteGPURecord and refactor cron jobs (312e320) @Akizon77
- feat(metricstore): batch metric report writes in single transactions (a78ef87) @Akizon77
- refactor(jsonrpc): remove deprecated Tag field from public metric types (d853a83) @Akizon77
- feat: add legacy upgrade server and refactor OAuth initialization (3c27823) @Akizon77
- feat(admin): add database compression inspection and configuration endpoints (fee8c86) @Akizon77
- Revert "feat(admin): add database compression inspection and configuration endpoints" (7f12850) @Akizon77
New Contributors
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.6...Snapshot-2607171315