Skip to content

Commit abe1a0e

Browse files
committed
UPSTREAM: 620: Fix migration metric registration
Don't register process_start_time_seconds metric in migration metrics manager to prevent double registration, resulting in this error: gathered metric family process_start_time_seconds has help "[ALPHA] Start time of the process since unix epoch in seconds." but should have "Start time of the process since unix epoch in seconds."
1 parent 95c5531 commit abe1a0e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/csi-provisioner/csi-provisioner.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@ func main() {
222222
klog.V(2).Infof("Supports migration from in-tree plugin: %s", supportsMigrationFromInTreePluginName)
223223

224224
// Create a new connection with the metrics manager with migrated label
225-
metricsManager = metrics.NewCSIMetricsManagerWithOptions(provisionerName, metrics.WithMigration())
225+
metricsManager = metrics.NewCSIMetricsManagerWithOptions(provisionerName,
226+
// Will be provided via default gatherer.
227+
metrics.WithProcessStartTime(false),
228+
metrics.WithMigration())
226229
migratedGrpcClient, err := ctrl.Connect(*csiEndpoint, metricsManager)
227230
if err != nil {
228231
klog.Error(err.Error())

0 commit comments

Comments
 (0)