Add process start time metric
This commit is contained in:
@@ -111,6 +111,9 @@ type MetricsManager interface {
|
||||
// status - the operation status, if not specified, i.e., status == nil, an
|
||||
// "Unknown" status of the passed-in operation is assumed.
|
||||
RecordMetrics(op OperationKey, status OperationStatus, driverName string)
|
||||
|
||||
// GetRegistry() returns the metrics.KubeRegistry used by this metrics manager.
|
||||
GetRegistry() k8smetrics.KubeRegistry
|
||||
}
|
||||
|
||||
// OperationKey is a structure which holds information to
|
||||
@@ -265,6 +268,7 @@ func (opMgr *operationMetricsManager) recordCancelMetric(val OperationValue, key
|
||||
|
||||
func (opMgr *operationMetricsManager) init() {
|
||||
opMgr.registry = k8smetrics.NewKubeRegistry()
|
||||
k8smetrics.RegisterProcessStartTime(opMgr.registry.Register)
|
||||
opMgr.opLatencyMetrics = k8smetrics.NewHistogramVec(
|
||||
&k8smetrics.HistogramOpts{
|
||||
Subsystem: subSystem,
|
||||
@@ -327,6 +331,10 @@ func (opMgr *operationMetricsManager) StartMetricsEndpoint(pattern, addr string,
|
||||
return srv, nil
|
||||
}
|
||||
|
||||
func (opMgr *operationMetricsManager) GetRegistry() k8smetrics.KubeRegistry {
|
||||
return opMgr.registry
|
||||
}
|
||||
|
||||
// snapshotProvisionType represents which kind of snapshot a metric is
|
||||
type snapshotProvisionType string
|
||||
|
||||
|
Reference in New Issue
Block a user