From 9c75509988c637ff13f4bf11ab43e26a6cf54a6d Mon Sep 17 00:00:00 2001 From: Taeuk Kim Date: Tue, 24 Nov 2020 01:28:34 +0900 Subject: [PATCH] Modify function name typo (#3106) Signed-off-by: Taeuk Kim --- changelogs/unreleased/3106-shellwedance | 1 + pkg/controller/pod_volume_backup_controller.go | 2 +- pkg/metrics/metrics.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelogs/unreleased/3106-shellwedance diff --git a/changelogs/unreleased/3106-shellwedance b/changelogs/unreleased/3106-shellwedance new file mode 100644 index 00000000000..aa54e55d450 --- /dev/null +++ b/changelogs/unreleased/3106-shellwedance @@ -0,0 +1 @@ +Modify wrong function name to correct one. diff --git a/pkg/controller/pod_volume_backup_controller.go b/pkg/controller/pod_volume_backup_controller.go index 4cb486ffa06..4bf653c4c94 100644 --- a/pkg/controller/pod_volume_backup_controller.go +++ b/pkg/controller/pod_volume_backup_controller.go @@ -326,7 +326,7 @@ func (c *podVolumeBackupController) processBackup(req *velerov1api.PodVolumeBack latencyDuration := req.Status.CompletionTimestamp.Time.Sub(req.Status.StartTimestamp.Time) latencySeconds := float64(latencyDuration / time.Second) backupName := getOwningBackup(req) - c.metrics.ObserveRestiOpLatency(c.nodeName, req.Name, resticCmd.Command, backupName, latencySeconds) + c.metrics.ObserveResticOpLatency(c.nodeName, req.Name, resticCmd.Command, backupName, latencySeconds) c.metrics.RegisterResticOpLatencyGauge(c.nodeName, req.Name, resticCmd.Command, backupName, latencySeconds) c.metrics.RegisterPodVolumeBackupDequeue(c.nodeName) log.Info("Backup completed") diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index b02641799d5..005560ad8dc 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -387,8 +387,8 @@ func (m *ServerMetrics) RegisterPodVolumeBackupDequeue(node string) { } } -// ObserveRestiOpLatency records the number of seconds a restic operation took. -func (m *ServerMetrics) ObserveRestiOpLatency(node, pvbName, opName, backupName string, seconds float64) { +// ObserveResticOpLatency records the number of seconds a restic operation took. +func (m *ServerMetrics) ObserveResticOpLatency(node, pvbName, opName, backupName string, seconds float64) { if h, ok := m.metrics[resticOperationLatencySeconds].(*prometheus.HistogramVec); ok { h.WithLabelValues(node, opName, backupName, pvbName).Observe(seconds) }