主要更新内容
- 新增公开访客审计事件 RPC 端点
public:recordVisitorEvent,允许主题前端写入审计日志;默认关闭,需设置visitor_audit_enabled = true - 移除废弃的 Nezha 兼容 gRPC 服务,相关配置项
nezha_compat_enabled和nezha_compat_listen已删除,迁移时自动清理旧配置 - 移除全局默认保留天数(
DefaultRetentionDays),指标保留天数完全由每个指标定义独立控制;保留天数为零将禁用该指标的持久化并清除已有数据 - 默认关闭降采样(
metric_downsampling_enabled默认值改为false) - 新增
loong64架构支持(Linux) - 删除旧的 report cache 机制,报告写入改为直接通过
metricstore.WriteReport,移除SaveClientReportToDB定时写入流程 - 删除无用的工具包(
SafeMap、secureconfig)和大量未使用的数据库函数 - 指标聚合查询移除
FillEmpty选项,不再为空时间段填充零计数桶 - 新增 compaction watermark 持久化,确保压缩边界正确且不会因动态计算而跳过未压缩的原始数据
- 日志表添加
idx_logs_msg_type_time复合索引和idx_logs_time索引 admin:getLogsRPC 新增msg_type参数,支持按日志类型过滤查询- 数据库迁移:自动删除已废弃的配置项
metric_retention_days、nezha_compat_enabled、nezha_compat_listen
Bug修复
- 多层加固访客审计日志,避免前端传入不可信数据(PR #602)
- 修复删除客户端或 Ping 任务时未清理 metric store 中的历史数据
- 修复保留天数为零的指标定义在操作后无法保持零值的问题
- 修复使用 Series 接口读取 Ping 记录以支持 rollup 聚合
- 修复 metric store 迁移时跳过保留天数为零的指标(避免不必要的写操作)
其他
- 重构报告写入流程,直接在
ingestReport中调用metricstore.WriteReport,移除report/cache.go和相关缓存路径 - 重构 metric store 的 compaction 逻辑,引入 compaction watermark 表和读写锁,支持动态调整指标保留天数
- 删除 Nezha 兼容的全部代码(proto 定义、gRPC 服务、配置开关)
- 更新安装脚本
install-komari.sh支持loongarch64/loong64架构 - 发布工作流调整:移除
repository_dispatch和schedule触发器,仅保留手动触发和 Release 发布触发 - 新增访客审计 RPC 的完整使用文档
docs/visitor-audit-rpc.md
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
New Contributors
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.6...Snapshot-2607170002