metrics

package
v0.0.1-test.load Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace(s).
	Namespace = "karpenter"
)

Variables

View Source
var (
	VMCreateStartMetric = &metric{
		name: "VMCreateStart",
	}
	VMCreateSyncFailureMetric = &metric{
		name: "VMCreateSyncFailure",
	}
	VMCreateAsyncFailureMetric = &metric{
		name: "VMCreateAsyncFailure",
	}
	VMCreateResponseError = &metric{
		name: "ResponseError",
	}
)
View Source
var (
	ImageSelectionErrorCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: Namespace,
			Subsystem: imageFamilySubsystem,
			Name:      "selection_error_count",
			Help:      "The number of errors encountered while selecting an image.",
		},
		[]string{"family"},
	)
)

Functions

func ValuesToKeyValuePairs added in v1.6.2

func ValuesToKeyValuePairs(values ...Value) []any

Helper function to convert a slice of Values to their key-value pairs

Types

type Value added in v1.6.2

type Value struct {
	// contains filtered or unexported fields
}

Value represents a key-value pair for logging with a known key

func ImageID added in v1.6.2

func ImageID(value string) Value

func ResponseError added in v1.6.3

func ResponseError(value string) Value

func (Value) Key added in v1.6.2

func (m Value) Key() string

Key returns the logging key

func (Value) Value added in v1.6.2

func (m Value) Value() any

Value returns the logging value

Jump to

Keyboard shortcuts

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