主要更新内容
- 新增公开访客审计事件端点
public:recordVisitorEvent,主题可将页面访问等事件写入后端审计日志(默认关闭,需设置visitor_audit_enabled = true) - 移除 Nezha 兼容模式(
nezha_compat_enabled、nezha_compat_listen配置项已删除,不再启动 gRPC 兼容服务器) - 移除全局指标保留天数配置
metric_retention_days,各指标保留期由指标定义独立控制;RetentionDays = 0表示禁用持久化并清除已有数据 - 默认关闭降采样(
metric_downsampling_enabled默认改为false) - 新增 LoongArch64(loong64) Linux 二进制构建与安装支持
- 指标存储重构:引入批量写入器(3 秒窗口合并事务)、Compaction Watermark 持久化、标准查询间隔舍入函数
- 新增旧版监控数据升级服务器(
1.2.7升级向导),自动检测并迁移历史 Record/GPU/Ping 数据到新指标存储 - 管理端新增数据库压缩检查与管理端点(后已回退)
- 日志表添加联合索引优化查询
Bug修复
- 加固访客审计日志:后端自动记录来源 IP 与 User-Agent,对公开接口实施令牌桶限流(默认每分钟 30 次,突发 10 次)
- 删除客户端或 Ping 任务时,同步清理独立指标存储中的历史数据
- 零保留指标的指标定义在跨操作(如 UpsertMetric)后不会被错误恢复
- 修复内置指标默认保留期测试(临时降至 1 天)
- 修正查询中原始/rollup 分界点未使用持久化 Compaction Watermark 的问题
- 修复存储大小查询未包含 Compaction Watermarks 表
其他
- 迁移过程中自动清除
metric_retention_days、nezha_compat_enabled、nezha_compat_listen等废弃配置项 - 移除以下不再使用的模块/函数:
SafeMap、secureconfig、AverageReport、ComputeTrafficDelta、DeleteRecordBefore、DeletePingRecordsBefore、EditClientName、EditClientToken、GetClientBasicInfo、GetAllTasksResultByUUID、DeleteTaskByTaskId、Nezha 兼容 gRPC及相关 proto - 移除
FillEmpty聚合参数及其实现;前端若依赖此特性需适配 - 前端 MJPEG 端点移除不用的辅助函数(
formatPrice、formatUptime、formatRemaining等) - 优化
GetLatestReport/GetRecentReports并发安全与数据缓存行为
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
- refactor: clean up metric constants and refactor record downsampling (99fda6b) @Akizon77
New Contributors
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.6...Snapshot-2607171351