Skip to content

Commit

Permalink
Modify function name typo (vmware-tanzu#3106)
Browse files Browse the repository at this point in the history
Signed-off-by: Taeuk Kim <[email protected]>
  • Loading branch information
Taeuk Kim authored and Suraj Banakar committed Feb 3, 2021
1 parent 57bb03b commit 9c75509
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelogs/unreleased/3106-shellwedance
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Modify wrong function name to correct one.
2 changes: 1 addition & 1 deletion pkg/controller/pod_volume_backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 9c75509

Please sign in to comment.