We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 975107d + 2da996a commit dadad61Copy full SHA for dadad61
metrics/metrics.go
@@ -179,6 +179,13 @@ func WithProcessStartTime(registerProcessStartTime bool) MetricsManagerOption {
179
}
180
181
182
+// WithCustomRegistry allow user to use custom pre-created registry instead of a new created one.
183
+func WithCustomRegistry(registry metrics.KubeRegistry) MetricsManagerOption {
184
+ return func(cmm *csiMetricsManager) {
185
+ cmm.registry = registry
186
+ }
187
+}
188
+
189
// NewCSIMetricsManagerForSidecar creates and registers metrics for CSI Sidecars and
190
// returns an object that can be used to trigger the metrics. It uses "csi_sidecar"
191
// as subsystem.
0 commit comments