package metrics
import "k8s.io/apiserver/pkg/storage/cacher/metrics"
Index ¶
- Variables
- func RecordListCacheMetrics(resourcePrefix, indexName string, numFetched, numReturned int)
- func RecordsWatchCacheCapacityChange(objType string, old, new int)
- func Register()
Variables ¶
var ( InitCounter = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ Namespace: namespace, Name: "init_events_total", Help: "Counter of init events processed in watch cache broken by resource type.", StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) EventsCounter = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ Namespace: namespace, Subsystem: subsystem, Name: "events_dispatched_total", Help: "Counter of events dispatched in watch cache broken by resource type.", StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) TerminatedWatchersCounter = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ Namespace: namespace, Name: "terminated_watchers_total", Help: "Counter of watchers closed due to unresponsiveness broken by resource type.", StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) WatchCacheCapacity = compbasemetrics.NewGaugeVec( &compbasemetrics.GaugeOpts{ Subsystem: subsystem, Name: "capacity", Help: "Total capacity of watch cache broken by resource type.", StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) WatchCacheInitializations = compbasemetrics.NewCounterVec( &compbasemetrics.CounterOpts{ Namespace: namespace, Subsystem: subsystem, Name: "initializations_total", Help: "Counter of watch cache initializations broken by resource type.", StabilityLevel: compbasemetrics.ALPHA, }, []string{"resource"}, ) )
* By default, all the following metrics are defined as falling under * ALPHA stability level https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#stability-classes) * * Promoting the stability level of the metric is a responsibility of the component owner, since it * involves explicitly acknowledging support for the metric across multiple releases, in accordance with * the metric stability policy.
Functions ¶
func RecordListCacheMetrics ¶
RecordListCacheMetrics notes various metrics of the cost to serve a LIST request
func RecordsWatchCacheCapacityChange ¶
RecordsWatchCacheCapacityChange record watchCache capacity resize(increase or decrease) operations.
func Register ¶
func Register()
Register all metrics.
Source Files ¶
metrics.go
- Version
- v0.26.9
- Published
- Sep 13, 2023
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 10 minutes ago –
Tools for package owners.