Pulse/pkg/metrics
rcourtman 9d8f8b45b5 fix(docker,metrics): preserve container metadata on update and reduce DB writes
Docker container URL preserved on update (#1054): container updates
recreate the container with a new runtime ID. The agent now includes
{oldContainerId, newContainerId} in the completion ACK payload; the
server uses this to copy persisted metadata (custom URLs, descriptions,
tags) to the new ID so nothing is lost. Migration is a copy, not a move,
so rollback scenarios still find metadata under the original ID.

Reduce metrics.db write amplification (#1124): add a UNIQUE index on
(resource_type, resource_id, metric_type, timestamp, tier) so rollup
reprocessing after a failed checkpoint uses INSERT OR IGNORE instead of
creating duplicate rows. Existing duplicates are deduplicated once on
startup if the index creation would otherwise fail. Also sets
wal_autocheckpoint(500) to checkpoint the WAL more frequently, preventing
unbounded WAL growth.

Fixes #1054
Fixes #1124
2026-02-18 12:56:46 +00:00
..
alert_metrics.go feat(enterprise): add Advanced Reporting and Audit Webhooks integration 2026-01-09 21:31:49 +00:00
alert_metrics_test.go feat(enterprise): add Advanced Reporting and Audit Webhooks integration 2026-01-09 21:31:49 +00:00
store.go fix(docker,metrics): preserve container metadata on update and reduce DB writes 2026-02-18 12:56:46 +00:00
store_additional_test.go Chore: enhance core api and metrics testability 2026-02-02 22:01:36 +00:00
store_test.go Fix: flaky metrics fallback test — use WriteBatchSync for deterministic writes 2026-02-02 23:32:28 +00:00