diff --git a/changelogs/unreleased/3106-shellwedance b/changelogs/unreleased/3106-shellwedance new file mode 100644 index 0000000000..aa54e55d45 --- /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 4cb486ffa0..4bf653c4c9 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 b02641799d..005560ad8d 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) }