Skip to content

Commit ee19e2d

Browse files
committed
Remove retry label
1 parent dea6765 commit ee19e2d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

driver/sql/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ type (
66
ReceivedNotification(isNotification bool)
77
QueueNotification(notification *ProjectionNotification)
88
StartNotificationProcessing(notification *ProjectionNotification)
9-
FinishNotificationProcessing(notification *ProjectionNotification, success bool, retry bool)
9+
FinishNotificationProcessing(notification *ProjectionNotification, success bool)
1010
}
1111
)

driver/sql/metrics_nop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ type nopMetrics struct{}
88
func (nm *nopMetrics) ReceivedNotification(isNotification bool) {}
99
func (nm *nopMetrics) QueueNotification(notification *ProjectionNotification) {}
1010
func (nm *nopMetrics) StartNotificationProcessing(notification *ProjectionNotification) {}
11-
func (nm *nopMetrics) FinishNotificationProcessing(notification *ProjectionNotification, success bool, retry bool) {
11+
func (nm *nopMetrics) FinishNotificationProcessing(notification *ProjectionNotification, success bool) {
1212
}

driver/sql/projection_notification_processor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ func (b *projectionNotificationProcessor) startProcessor(ctx context.Context, ha
131131
e.Any("notification", notification)
132132
})
133133

134-
b.metrics.FinishNotificationProcessing(notification, false, false)
134+
b.metrics.FinishNotificationProcessing(notification, false)
135135

136136
} else {
137-
b.metrics.FinishNotificationProcessing(notification, true, false)
137+
b.metrics.FinishNotificationProcessing(notification, true)
138138
}
139139
}
140140
}

extension/prometheus/prometheus.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewMetrics() *Metrics {
4040
Help: "histogram of queue latencies",
4141
Buckets: []float64{0.1, 0.5, 0.9, 0.99}, //buckets for histogram
4242
},
43-
[]string{"retry", "success"},
43+
[]string{"success"},
4444
),
4545

4646
// notificationProcessingDuration is used to expose 'notification_handle_duration_seconds' metrics
@@ -51,7 +51,7 @@ func NewMetrics() *Metrics {
5151
Help: "histogram of notifications handled latencies",
5252
Buckets: []float64{0.1, 0.5, 0.9, 0.99}, //buckets for histogram
5353
},
54-
[]string{"success", "retry"},
54+
[]string{"success"},
5555
),
5656
}
5757
}
@@ -90,11 +90,11 @@ func (m *Metrics) StartNotificationProcessing(notification *sql.ProjectionNotifi
9090
}
9191

9292
// FinishNotificationProcessing is used to observe end time of notification queue and processing time
93-
func (m *Metrics) FinishNotificationProcessing(notification *sql.ProjectionNotification, success bool, retry bool) {
93+
func (m *Metrics) FinishNotificationProcessing(notification *sql.ProjectionNotification, success bool) {
9494
memAddress := fmt.Sprintf("%p", notification)
9595
queueStartTime, _ := m.notificationStartTimes.Load("q" + memAddress)
9696
processingStartTime, _ := m.notificationStartTimes.Load("p" + memAddress)
97-
labels := prometheus.Labels{"success": strconv.FormatBool(success), "retry": strconv.FormatBool(retry)}
97+
labels := prometheus.Labels{"success": strconv.FormatBool(success)}
9898

9999
m.notificationQueueDuration.With(labels).Observe(time.Since(queueStartTime.(time.Time)).Seconds())
100100
m.notificationProcessingDuration.With(labels).Observe(time.Since(processingStartTime.(time.Time)).Seconds())

0 commit comments

Comments
 (0)