metrics

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Common namespace for application metrics.
	Namespace = "karpenter"

	ErrorLabel       = "error"
	ProvisionerLabel = "provisioner"

	// Reasons for CREATE/DELETE shared metrics
	ConsolidationReason = "consolidation"
	ProvisioningReason  = "provisioning"
	ExpirationReason    = "expiration"
	EmptinessReason     = "emptiness"
)

Variables

View Source
var (
	NodesCreatedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: Namespace,
			Subsystem: nodeSubsystem,
			Name:      "created",
			Help:      "Number of nodes created in total by Karpenter. Labeled by reason the node was created.",
		},
		[]string{
			"reason",
		},
	)
	NodesTerminatedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: Namespace,
			Subsystem: nodeSubsystem,
			Name:      "terminated",
			Help:      "Number of nodes terminated in total by Karpenter. Labeled by reason the node was terminated.",
		},
		[]string{
			"reason",
		},
	)
)

Functions

func DurationBuckets

func DurationBuckets() []float64

DurationBuckets returns a []float64 of default threshold values for duration histograms. Each returned slice is new and may be modified without impacting other bucket definitions.

func Measure

func Measure(observer prometheus.Observer) func()

Measure returns a deferrable function that observes the duration between the defer statement and the end of the function.

func MustRegister added in v0.18.0

func MustRegister()

func SummaryObjectives added in v0.14.0

func SummaryObjectives() map[float64]float64

Returns a map of summary objectives (quantile-error pairs)

Types

This section is empty.

Jump to

Keyboard shortcuts

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