Files
hrynco-notification-service/HrynCo.NotificationService.Worker.Services/Push/PushDeliveryMetrics.cs
T
agrynco 1631786ce2 feat(push): add service-owned firebase channels and delivery
Add push contracts, provider delivery and channel diagnostics. Link email channels to services and document migration and validation.

Ref: IT-1074
2026-10-24 12:31:35 +03:00

16 lines
658 B
C#

namespace HrynCo.NotificationService.Worker.Services.Push;
using System.Diagnostics.Metrics;
public static class PushDeliveryMetrics
{
private static readonly Meter Meter = new("HrynCo.NotificationService.Push", "1.0");
private static readonly Counter<long> Outcomes = Meter.CreateCounter<long>("push.provider.outcomes");
private static readonly Counter<long> Retries = Meter.CreateCounter<long>("push.provider.retries");
public static void RecordOutcome(bool succeeded) =>
Outcomes.Add(1, new KeyValuePair<string, object?>("outcome", succeeded ? "accepted" : "failed"));
public static void RecordRetry() => Retries.Add(1);
}