| | | 1 | | using System.Diagnostics.Metrics; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Connections.Features; |
| | | 4 | | |
| | | 5 | | internal static class ConnectionLifecycleReconciliationMetrics |
| | | 6 | | { |
| | | 7 | | public const string MeterName = "Elsa.Connections"; |
| | | 8 | | |
| | 1 | 9 | | private static readonly Meter Meter = new(MeterName); |
| | 1 | 10 | | private static readonly Counter<long> CompletedPages = Meter.CreateCounter<long>("elsa.connections.reconciliation.pa |
| | 1 | 11 | | private static readonly Counter<long> FailedPages = Meter.CreateCounter<long>("elsa.connections.reconciliation.pages |
| | 1 | 12 | | private static readonly Counter<long> FailedScans = Meter.CreateCounter<long>("elsa.connections.reconciliation.scans |
| | 1 | 13 | | private static readonly Counter<long> RecoveryRequired = Meter.CreateCounter<long>("elsa.connections.reconciliation. |
| | 1 | 14 | | private static readonly Counter<long> UnknownOffboarding = Meter.CreateCounter<long>("elsa.connections.reconciliatio |
| | | 15 | | |
| | 1108 | 16 | | public static void RecordCompletedPage() => CompletedPages.Add(1); |
| | 4 | 17 | | public static void RecordFailedPage() => FailedPages.Add(1); |
| | 1 | 18 | | public static void RecordFailedScan() => FailedScans.Add(1); |
| | 3 | 19 | | public static void RecordRecoveryRequired() => RecoveryRequired.Add(1); |
| | 3 | 20 | | public static void RecordUnknownOffboarding() => UnknownOffboarding.Add(1); |
| | | 21 | | } |