Add event counters (#18232)

Export metric for global events sent and skipped for the lifetime of the server.
This commit is contained in:
Klaus Post
2023-10-12 15:39:22 -07:00
committed by GitHub
parent a66a7f3e97
commit 128256e3ab
2 changed files with 30 additions and 3 deletions

View File

@@ -2446,6 +2446,26 @@ func getNotificationMetrics() *MetricsGroup {
},
Value: float64(nstats.CurrentSendCalls),
})
metrics = append(metrics, Metric{
Description: MetricDescription{
Namespace: minioNamespace,
Subsystem: notifySubsystem,
Name: "events_skipped_total",
Help: "Events that were skipped due to full queue",
Type: counterMetric,
},
Value: float64(nstats.EventsSkipped),
})
metrics = append(metrics, Metric{
Description: MetricDescription{
Namespace: minioNamespace,
Subsystem: notifySubsystem,
Name: "events_sent_total",
Help: "Total number of events sent since start",
Type: counterMetric,
},
Value: float64(nstats.TotalEvents),
})
for _, st := range nstats.TargetStats {
metrics = append(metrics, Metric{
Description: MetricDescription{