feat(audit-log): surface partition-purge failure as health event + counter
This commit is contained in:
@@ -212,6 +212,12 @@ public static class ServiceCollectionExtensions
|
||||
// redaction-failure counters.
|
||||
services.TryAddSingleton<IAuditInboundCeilingHitsCounter, NoOpAuditInboundCeilingHitsCounter>();
|
||||
|
||||
// AuditLog purge-failure counter — NoOp default for site/test
|
||||
// composition roots. AddAuditLogCentralMaintenance below replaces this binding
|
||||
// with the AuditCentralHealthSnapshot implementation so partition/channel purge
|
||||
// failures surface on the central dashboard alongside the write-failure counter.
|
||||
services.TryAddSingleton<IAuditPurgeFailureCounter, NoOpAuditPurgeFailureCounter>();
|
||||
|
||||
// Central direct-write audit writer used by
|
||||
// NotificationOutboxActor and Inbound API to
|
||||
// emit AuditLog rows that originate ON central, not via site telemetry.
|
||||
@@ -419,6 +425,11 @@ public static class ServiceCollectionExtensions
|
||||
// ICentralAuditWriteFailureCounter above.
|
||||
services.Replace(ServiceDescriptor.Singleton<IAuditInboundCeilingHitsCounter>(
|
||||
sp => sp.GetRequiredService<AuditCentralHealthSnapshot>()));
|
||||
// Replace the NoOp IAuditPurgeFailureCounter with the AuditCentralHealthSnapshot so
|
||||
// partition/channel purge failures surface on the central dashboard. Same
|
||||
// singleton-forward pattern as ICentralAuditWriteFailureCounter above (arch-review 04, S2).
|
||||
services.Replace(ServiceDescriptor.Singleton<IAuditPurgeFailureCounter>(
|
||||
sp => sp.GetRequiredService<AuditCentralHealthSnapshot>()));
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user