主要更新内容
- 新增公共访客审计日志 RPC 端点
public:recordVisitorEvent,可通过visitor_audit_enabled设置开启 - 移除 Nezha 兼容性(
nezha_compat_enabled/nezha_compat_listen配置及 gRPC 代码) - 移除全局
metric_retention_days配置项,每个指标现在通过定义独立控制保留期 - 添加 loong64(龙芯)架构支持,安装脚本和 CI 构建均包含该目标
- 新增 LegacyUpgradeServer,用于从 1.2.7 版本自动迁移数据到新版格式
- 移除
DefaultRetentionDays配置,指标定义必须显式指定保留天数 - 指标数据写入改为批量事务(3 秒窗口),显著提升并发写入性能
- 添加压缩水印表,持久化每次成功压缩的边界,避免重复或遗漏数据
- 标准化所有时间字段为标准
time.Time和 UTC,移除自定义LocalTime类型 - 移除已弃用的
WriteRecord/WriteGPURecord和公共指标类型中的Tag字段 - 指标图表间隙现在自适应(adaptive gaps)
Bug修复
- 加固访客审计日志写入逻辑
- 修复零保留期指标定义在跨
UpsertMetric操作中被错误覆盖的问题 - 修复 metricstore 读取 ping 记录时未使用
Series接口导致无法支持 rollup 的问题 - 修复 cron 定时调度在 UTC 环境下的匹配计算,改为使用系统本地时钟
其他
- 全面清理未使用的数据库函数(
EditClientName、EditClientToken、UpdateLatestOnline等) - 更新
go.mod,移除google.golang.org/grpc和protobuf依赖(不再需要 gRPC 服务器) - 自动迁移步骤新增:移除已废弃的
metric_retention_days和nezha_compat相关配置项 - 压缩维护操作现在包含水印表,MySQL/PostgreSQL 存储大小查询适配动态表名
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
- refactor: standardize time fields (42b290f) @Akizon77
New Contributors
- @sanrokamlan-prog made their first contribution in #597
Full Changelog: 1.2.6...Snapshot-2607171608