refactor(kpi): shared public KpiMetrics catalog — source consts + UI pages key off one symbol (#178)

This commit is contained in:
Joseph Doherty
2026-06-19 02:04:10 -04:00
parent 47f5ca687c
commit e51104af5f
9 changed files with 135 additions and 30 deletions
@@ -36,11 +36,12 @@ public sealed class AuditLogKpiSampleSource : IKpiSampleSource
/// </summary>
private static readonly TimeSpan Window = TimeSpan.FromHours(1);
// Metric catalog — the exact strings persisted in KpiSample.Metric. Stable
// identifiers the recorder + UI trend charts key on; do not rename.
private const string TotalEventsLastHourMetric = "totalEventsLastHour";
private const string ErrorEventsLastHourMetric = "errorEventsLastHour";
private const string BacklogTotalMetric = "backlogTotal";
// Metric catalog — the exact strings persisted in KpiSample.Metric. All three are
// charted, so they share the public Commons catalog: source + UI trend page key off
// one symbol (#178). Stable identifiers; do not rename (values are persisted).
private const string TotalEventsLastHourMetric = KpiMetrics.AuditLog.TotalEventsLastHour;
private const string ErrorEventsLastHourMetric = KpiMetrics.AuditLog.ErrorEventsLastHour;
private const string BacklogTotalMetric = KpiMetrics.AuditLog.BacklogTotal;
private readonly IAuditLogRepository _repository;