internal/aggergate: make HLL state path configurable

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I8ff8ef25ad945aae918bea97ee39d7ea6a6a6964
This commit is contained in:
raf 2026-03-01 19:23:19 +03:00
commit 2ef2dabf93
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 167 additions and 63 deletions

View file

@ -223,7 +223,7 @@ func (m *MetricsAggregator) Shutdown(ctx context.Context) error {
m.Stop()
// Persist HLL state if configured
if m.cfg.Site.SaltRotation != "" {
return m.estimator.Save("/tmp/watchdog-hll.state")
return m.estimator.Save(m.cfg.Server.StatePath)
}
return nil
}