metrics

package
v1.32.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0 Imports: 9 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecordMetric added in v1.15.0

func RecordMetric(key string, c *OperationStartTimeCache, err error)

RecordMetric records either an error count metric or a latency metric if there exists a start timestamp entry in the cache. For a successful operation, i.e., err == nil, the corresponding timestamp entry will be removed from cache

func RecordRetroactiveStorageClassMetric added in v1.26.0

func RecordRetroactiveStorageClassMetric(success bool)

RecordRetroactiveStorageClassMetric increments only retroactive_storageclass_total metric or both retroactive_storageclass_total and retroactive_storageclass_errors_total if success is false.

func RecordVolumeOperationErrorMetric added in v1.15.0

func RecordVolumeOperationErrorMetric(pluginName, opName string)

RecordVolumeOperationErrorMetric records error count into metric volume_operation_total_errors for provisioning/deletion operations

func Register

func Register(pvLister PVLister, pvcLister PVCLister, pluginMgr *volume.VolumePluginMgr)

Register all metrics for pv controller.

Types

type OperationStartTimeCache added in v1.15.0

type OperationStartTimeCache struct {
	// contains filtered or unexported fields
}

OperationStartTimeCache concurrent safe cache for operation start timestamps

func NewOperationStartTimeCache added in v1.15.0

func NewOperationStartTimeCache() OperationStartTimeCache

NewOperationStartTimeCache creates a operation timestamp cache

func (*OperationStartTimeCache) AddIfNotExist added in v1.15.0

func (c *OperationStartTimeCache) AddIfNotExist(key, pluginName, operationName string)

AddIfNotExist returns directly if there exists an entry with the key. Otherwise, it creates a new operation timestamp using operationName, pluginName, and current timestamp and stores the operation timestamp with the key

func (*OperationStartTimeCache) Delete added in v1.15.0

func (c *OperationStartTimeCache) Delete(key string)

Delete deletes a value for a key.

func (*OperationStartTimeCache) Has added in v1.15.0

func (c *OperationStartTimeCache) Has(key string) bool

Has returns a bool value indicates the existence of a key in the cache

type PVCLister

type PVCLister interface {
	List() []interface{}
}

PVCLister used to list persistent volume claims.

type PVLister

type PVLister interface {
	List() []interface{}
}

PVLister used to list persistent volumes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL