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
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user