feat(kpi): K7 — SiteCallAudit sample source
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user