metrics

package
v1.34.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleUserMetric

func HandleUserMetric(r prometheus.Registerer, metricSpec UserMetric) error

func ReconcileFailed

func ReconcileFailed(gvk string)

func ReconcileSucceeded

func ReconcileSucceeded(gvk string)

func ReconcileTimer

func ReconcileTimer(gvk string) *prometheus.Timer

func RegisterBuildInfo

func RegisterBuildInfo(r prometheus.Registerer)

Types

type UserMetric

type UserMetric struct {
	Name      string               `json:"name" yaml:"name"`
	Help      string               `json:"description" yaml:"description"`
	Counter   *UserMetricCounter   `json:"counter,omitempty" yaml:"counter,omitempty"`
	Gauge     *UserMetricGauge     `json:"gauge,omitempty" yaml:"gauge,omitempty"`
	Histogram *UserMetricHistogram `json:"histogram,omitempty" yaml:"histogram,omitempty"`
	Summary   *UserMetricSummary   `json:"summary,omitempty" yaml:"summary,omitempty"`
}

type UserMetricCounter

type UserMetricCounter struct {
	Inc bool    `json:"increment,omitempty" yaml:"increment,omitempty"`
	Add float64 `json:"add,omitempty" yaml:"add,omitempty"`
}

type UserMetricGauge

type UserMetricGauge struct {
	Set              float64 `json:"set,omitempty" yaml:"set,omitempty"`
	Inc              bool    `json:"increment,omitempty" yaml:"increment,omitempty"`
	Dec              bool    `json:"decrement,omitempty" yaml:"decrement,omitempty"`
	SetToCurrentTime bool    `json:"set_to_current_time,omitempty" yaml:"set_to_current_time,omitempty"`
	Add              float64 `json:"add,omitempty" yaml:"add,omitempty"`
	Sub              float64 `json:"subtract,omitempty" yaml:"subtract,omitempty"`
}

type UserMetricHistogram

type UserMetricHistogram struct {
	Observe float64 `json:"observe,omitempty" yaml:"observe,omitempty"`
}

type UserMetricSummary

type UserMetricSummary struct {
	Observe float64 `json:"observe,omitempty" yaml:"observe,omitempty"`
}

Jump to

Keyboard shortcuts

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