Skip to content

Commit d9b74ba

Browse files
authored
Merge pull request #68 from Jiawei0227/process
Workaround for process start time metric not show up
2 parents bd7dfc3 + 200f7e4 commit d9b74ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

metrics/metrics.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ func NewCSIMetricsManagerWithOptions(driverName string, options ...MetricsManage
207207
// https://github.com/open-telemetry/opentelemetry-collector/issues/969
208208
// Add process_start_time_seconds into the metric to let the start time be parsed correctly
209209
metrics.RegisterProcessStartTime(cmm.registry.Register)
210+
// TODO: This is a bug in component-base library. We need to remove this after upgrade component-base dependency
211+
// BugFix: https://github.com/kubernetes/kubernetes/pull/96435
212+
// The first call to RegisterProcessStartTime can only create the metric, so we need a second call to actually
213+
// register the metric.
214+
metrics.RegisterProcessStartTime(cmm.registry.Register)
210215
}
211216

212217
labels := []string{labelCSIDriverName, labelCSIOperationName, labelGrpcStatusCode}

0 commit comments

Comments
 (0)