Skip to content

Commit

Permalink
make field private
Browse files Browse the repository at this point in the history
  • Loading branch information
almostinf committed Oct 28, 2023
1 parent a0f858d commit 4847fa3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metrics/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type NotifierMetrics struct {
SendersDroppedNotifications MetersCollection
PlotsBuildDurationMs Histogram
PlotsEvaluateTriggerDurationMs Histogram
FetchNotificationsDurationMs Histogram
fetchNotificationsDurationMs Histogram
}

// ConfigureNotifierMetrics is notifier metrics configurator.
Expand All @@ -32,13 +32,13 @@ func ConfigureNotifierMetrics(registry Registry, prefix string) *NotifierMetrics
SendersDroppedNotifications: NewMetersCollection(registry),
PlotsBuildDurationMs: registry.NewHistogram("plots", "build", "duration", "ms"),
PlotsEvaluateTriggerDurationMs: registry.NewHistogram("plots", "evaluate", "trigger", "duration", "ms"),
FetchNotificationsDurationMs: registry.NewHistogram("fetch", "notifications", "duration", "ms"),
fetchNotificationsDurationMs: registry.NewHistogram("fetch", "notifications", "duration", "ms"),
}
}

// UpdateFetchNotificationsDurationMs - counts how much time has passed since fetchNotificationsStartTime in ms and updates the metric
func (metrics *NotifierMetrics) UpdateFetchNotificationsDurationMs(fetchNotificationsStartTime time.Time) {
metrics.FetchNotificationsDurationMs.Update(time.Since(fetchNotificationsStartTime).Milliseconds())
metrics.fetchNotificationsDurationMs.Update(time.Since(fetchNotificationsStartTime).Milliseconds())
}

// MarkSendersDroppedNotifications marks metrics as 1 by contactType for dropped notifications.
Expand Down

0 comments on commit 4847fa3

Please sign in to comment.