apiserverk8s.io/apiserver/pkg/storage/etcd3/metrics Index | Files

package metrics

import "k8s.io/apiserver/pkg/storage/etcd3/metrics"

Index

Functions

func RecordDecodeError

func RecordDecodeError(resource string)

RecordDecodeError sets the storage_decode_errors metrics.

func RecordEtcdBookmark

func RecordEtcdBookmark(resource string)

RecordEtcdBookmark updates the etcd_bookmark_counts metric.

func RecordEtcdEvent

func RecordEtcdEvent(resource string)

RecordEtcdEvent updated the etcd_events_received_total metric.

func RecordEtcdRequest

func RecordEtcdRequest(verb, resource string, err error, startTime time.Time)

RecordEtcdRequest updates and sets the etcd_request_duration_seconds, etcd_request_total, etcd_request_errors_total metrics.

func RecordStorageListMetrics

func RecordStorageListMetrics(resource string, numFetched, numEvald, numReturned int)

RecordListEtcd3Metrics notes various metrics of the cost to serve a LIST request

func Register

func Register()

Register all metrics.

func Reset

func Reset()

Reset resets the etcd_request_duration_seconds metric.

func SetStorageMonitorGetter

func SetStorageMonitorGetter(getter func() ([]Monitor, error))

SetStorageMonitorGetter sets monitor getter to allow monitoring etcd stats.

func UpdateEtcdDbSize

func UpdateEtcdDbSize(ep string, size int64)

UpdateEtcdDbSize sets the etcd_db_total_size_in_bytes metric. Deprecated: Metric etcd_db_total_size_in_bytes will be replaced with apiserver_storage_size_bytes

func UpdateLeaseObjectCount

func UpdateLeaseObjectCount(count int64)

UpdateLeaseObjectCount sets the etcd_lease_object_counts metric.

func UpdateObjectCount

func UpdateObjectCount(resourcePrefix string, count int64)

UpdateObjectCount sets the apiserver_storage_object_counts metric.

Types

type Monitor

type Monitor interface {
	Monitor(ctx context.Context) (StorageMetrics, error)
	Close() error
}

type StorageMetrics

type StorageMetrics struct {
	Size int64
}

Source Files

metrics.go

Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
7 hours ago

Tools for package owners.