Fix outcome metric (#90322)

This commit is contained in:
Leonor Oliveira
2024-07-11 13:50:20 +02:00
committed by GitHub
parent d7c844b5b6
commit b75276c641
+2 -2
View File
@@ -68,9 +68,9 @@ func (m *dualWriterMetrics) recordStorageDuration(isError bool, mode string, nam
m.storage.WithLabelValues(strconv.FormatBool(isError), mode, name, method).Observe(duration)
}
func (m *dualWriterMetrics) recordOutcome(mode string, name string, outcome bool, method string) {
func (m *dualWriterMetrics) recordOutcome(mode string, name string, areEqual bool, method string) {
var observeValue float64
if outcome {
if !areEqual {
observeValue = 1
}
m.outcome.WithLabelValues(mode, name, method).Observe(observeValue)