Add platform information for push notification metrics (#27460)

* Add platform information for push notification metrics

* Address feedback

* Add the client platform returned by the devices to the normalize function

* Add "no platform" platform label to distinguish from unknown
Этот коммит содержится в:
Daniel Espino García
2024-07-05 09:34:01 +02:00
коммит произвёл GitHub
родитель 6bbf7bbb9f
Коммит e5a3dd7fea
15 изменённых файлов: 122 добавлений и 105 удалений

Просмотреть файл

@@ -96,12 +96,12 @@ type MetricsInterface interface {
SetReplicaLagAbsolute(node string, value float64)
SetReplicaLagTime(node string, value float64)
IncrementNotificationCounter(notificationType model.NotificationType)
IncrementNotificationAckCounter(notificationType model.NotificationType)
IncrementNotificationSuccessCounter(notificationType model.NotificationType)
IncrementNotificationErrorCounter(notificationType model.NotificationType, errorReason model.NotificationReason)
IncrementNotificationNotSentCounter(notificationType model.NotificationType, notSentReason model.NotificationReason)
IncrementNotificationUnsupportedCounter(notificationType model.NotificationType, notSentReason model.NotificationReason)
IncrementNotificationCounter(notificationType model.NotificationType, platform string)
IncrementNotificationAckCounter(notificationType model.NotificationType, platform string)
IncrementNotificationSuccessCounter(notificationType model.NotificationType, platform string)
IncrementNotificationErrorCounter(notificationType model.NotificationType, errorReason model.NotificationReason, platform string)
IncrementNotificationNotSentCounter(notificationType model.NotificationType, notSentReason model.NotificationReason, platform string)
IncrementNotificationUnsupportedCounter(notificationType model.NotificationType, notSentReason model.NotificationReason, platform string)
ObserveClientTimeToFirstByte(platform, agent string, elapsed float64)
ObserveClientFirstContentfulPaint(platform, agent string, elapsed float64)