feat(kpi): K7 — SiteCallAudit sample source

This commit is contained in:
Joseph Doherty
2026-06-17 19:53:49 -04:00
parent 6f6157ce89
commit 456e61dff3
3 changed files with 476 additions and 0 deletions
@@ -1,4 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Kpi;
using ZB.MOM.WW.ScadaBridge.SiteCallAudit.Kpi;
namespace ZB.MOM.WW.ScadaBridge.SiteCallAudit;
@@ -37,6 +39,13 @@ public static class ServiceCollectionExtensions
services.AddOptions<SiteCallAuditOptions>()
.BindConfiguration(OptionsSection);
// M6 KPI History (#K7): the central recorder enumerates every registered
// IKpiSampleSource each sampling pass; this one snapshots the SiteCalls
// KPIs (global + per-site + per-node) into the KpiSample history store.
// Scoped so each pass resolves a fresh ISiteCallAuditRepository scope,
// mirroring the actor's scope-per-message repository access.
services.AddScoped<IKpiSampleSource, SiteCallAuditKpiSampleSource>();
return services;
}
}