monitor

package
v1.12.1 Latest Latest
Warning

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

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

Documentation

Overview

Package monitor contains metrics which are exposed from the HPA controller.

Index

Constants

View Source
const (
	// ActionLabelScaleUp represents a scale up action.
	ActionLabelScaleUp ActionLabel = "scale_up"
	// ActionLabelScaleDown represents a scale down action.
	ActionLabelScaleDown ActionLabel = "scale_down"
	// ActionLabelNone represents no action.
	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 represents no error.
	ErrorLabelNone ErrorLabel = "none"
)

Variables

This section is empty.

Functions

func Register

func Register()

Register all metrics.

Types

type ActionLabel

type ActionLabel string

ActionLabel represents an action taken by HPA controller.

type ErrorLabel

type ErrorLabel string

ErrorLabel represents an error type.

type Monitor

type Monitor interface {
	ObserveReconciliationResult(action ActionLabel, err ErrorLabel, duration time.Duration)
	ObserveMetricComputationResult(action ActionLabel, err ErrorLabel, duration time.Duration, metricType autoscalingv2.MetricSourceType)
}

Monitor records some metrics so that people can monitor HPA controller.

func New

func New() Monitor

New creates a new Monitor.

Jump to

Keyboard shortcuts

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