D1: surface AlarmProviderSwitchCount on dashboard metric list
This commit is contained in:
@@ -94,6 +94,24 @@ public sealed class DashboardSnapshotServiceTests
|
||||
Assert.Equal("worker pipe disconnected", fault.Message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies snapshot metrics include the cumulative alarm provider switch count.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void GetSnapshot_IncludesAlarmProviderSwitchCountMetric()
|
||||
{
|
||||
SessionRegistry registry = new();
|
||||
using GatewayMetrics metrics = new();
|
||||
metrics.AlarmProviderSwitched(1, 2, AlarmProviderSwitchReason.Failover);
|
||||
DashboardSnapshotService service = CreateService(registry, metrics);
|
||||
|
||||
DashboardSnapshot snapshot = service.GetSnapshot();
|
||||
|
||||
Assert.Contains(
|
||||
snapshot.Metrics,
|
||||
metric => metric.Name == "mxgateway.alarms.provider_switches" && metric.Value == 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies snapshot redacts sensitive values from client identity, session name, and fault messages.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user