DomainAuditManager bypasses all persistence wrappers (no metrics, rate limiting, or error injection)
Description
NewDomainAuditManager in common/persistence/client/factory.go returns the bare manager implementation with no wrappers at all:
result := p.NewDomainAuditManagerImpl(store, f.logger, p.NewPayloadSerializer(), f.dc)
return result, nil
The core data-path managers (Task, Shard, History, Domain, Execution) are wrapped with errorinjectors → ratelimited → metered. DomainAuditManager has none of the three — no wrapper files exist for it under common/persistence/wrappers/ and there are no gowrap go:generate directives for it in common/persistence/data_manager_interfaces.go.
Consequences:
- No persistence metrics: domain audit reads/writes emit no latency or error metrics, so failures and slowness in the audit path are invisible.
- No rate limiting: audit traffic does not honor the datastore QPS quotas.
- No error injection: the audit path is skipped by persistence error-injection testing.
Domain audit is low-QPS control-plane traffic, so the missing metrics are the biggest practical gap, but all three wrappers should be added for consistency.
Fix: add the three gowrap gen go:generate directives for DomainAuditManager (templates errorinjector.tmpl, ratelimited.tmpl, metered.tmpl), regenerate, and wire the wrappers into NewDomainAuditManager in the same order as the other managers (error injection → rate limited → metered).
Related: the same gap exists for SemaphoreMetadataManager https://github.com/cadence-workflow/cadence/issues/8454 and was fixed for HistoryTaskDLQManager's missing ratelimited/errorinjectors wrappers in #8449.
Is this a breaking change?
- [ ] Yes
- [x] No
If yes, explain why:
Scope of the feature (server, specific client, all clients)
Server only (persistence client factory).
Thanks for opening this issue. To help us triage it, please provide the missing details: Missing required sections:
- Description Issue templates:
- Bug report: https://github.com/cadence-workflow/cadence/issues/new?template=bug_report.md
- Feature request (use for features, improvements, or cleanup): https://github.com/cadence-workflow/cadence/issues/new?template=feature_request.md
Picked this up — fix is up in #8464 (covers both this and #8454, since they share the same root cause).