package monitor
import "k8s.io/kubernetes/pkg/controller/podautoscaler/monitor"
metrics packages contains metrics which are exposed from the HPA controller.
Index ¶
Constants ¶
const ( ActionLabelScaleUp ActionLabel = "scale_up" ActionLabelScaleDown ActionLabel = "scale_down" ActionLabelNone ActionLabel = "none" // ErrorLabelSpec represents an error due to an invalid spec of HPA object. ErrorLabelSpec ErrorLabel = "spec" // ErrorLabelInternal represents an error from an internal computation or communication with other component. ErrorLabelInternal ErrorLabel = "internal" ErrorLabelNone ErrorLabel = "none" )
Functions ¶
func Register ¶
func Register()
Register all metrics.
Types ¶
type ActionLabel ¶
type ActionLabel string
type ErrorLabel ¶
type ErrorLabel string
type Monitor ¶
type Monitor interface {
ObserveReconciliationResult(action ActionLabel, err ErrorLabel, duration time.Duration)
ObserveMetricComputationResult(action ActionLabel, err ErrorLabel, duration time.Duration, metricType v2.MetricSourceType)
ObserveHPAAddition()
ObserveHPADeletion()
ObserveDesiredReplicas(namespace, hpaName string, desiredReplicas int32)
}
Monitor records some metrics so that people can monitor HPA controller.
func New ¶
func New() Monitor
Source Files ¶
metrics.go monitor.go
- Version
- v1.35.1 (latest)
- Published
- Feb 10, 2026
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 2 months ago –
Tools for package owners.