forked from TrueCloudLab/frostfs-node
[#442] Use strconv.FormatBool instead of untyped conversion
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
344d6b2ae1
commit
fb8fee0c8e
4 changed files with 14 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
package metrics
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
|
@ -50,18 +50,18 @@ func newTreeServiceMetrics() *treeServiceMetrics {
|
|||
|
||||
func (m *treeServiceMetrics) AddReplicateTaskDuration(d time.Duration, success bool) {
|
||||
m.replicateTaskDuration.With(prometheus.Labels{
|
||||
treeServiceLabelSuccess: fmt.Sprintf("%v", success),
|
||||
treeServiceLabelSuccess: strconv.FormatBool(success),
|
||||
}).Observe(d.Seconds())
|
||||
}
|
||||
|
||||
func (m *treeServiceMetrics) AddReplicateWaitDuration(d time.Duration, success bool) {
|
||||
m.replicateWaitDuration.With(prometheus.Labels{
|
||||
treeServiceLabelSuccess: fmt.Sprintf("%v", success),
|
||||
treeServiceLabelSuccess: strconv.FormatBool(success),
|
||||
}).Observe(d.Seconds())
|
||||
}
|
||||
|
||||
func (m *treeServiceMetrics) AddSyncDuration(d time.Duration, success bool) {
|
||||
m.syncOpDuration.With(prometheus.Labels{
|
||||
treeServiceLabelSuccess: fmt.Sprintf("%v", success),
|
||||
treeServiceLabelSuccess: strconv.FormatBool(success),
|
||||
}).Observe(d.Seconds())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue