Skip to content

Commit

Permalink
Add pod_uid label to handle pod restarts/reschedules.
Browse files Browse the repository at this point in the history
  • Loading branch information
hime committed Aug 22, 2024
1 parent cbcc00c commit 0249ae0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func (mm *manager) RegisterMetricsCollector(targetPath, podNamespace, podName, b
"namespace_name": podNamespace,
"volume_name": volumeName,
"bucket_name": bucketName,
"pod_uid": podUID,
})
if err := mm.registry.Register(c); err != nil && !strings.Contains(err.Error(), prometheus.AlreadyRegisteredError{}.Error()) {
klog.Errorf("failed to register metrics collector for pod %v/%v, volume %q, bucket %q: %v", podNamespace, podName, volumeName, bucketName, err)
Expand Down

0 comments on commit 0249ae0

Please sign in to comment.