metrics

package
v0.14.0-experiment-98d0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BucketsLatency = []float64{.1, .2, .5, 1, 2, 5, 10, 30}
View Source
var (
	BundleCollector = CollectorCollection{
		// contains filtered or unexported fields
	}
)
View Source
var (
	BundleDeploymentCollector = CollectorCollection{
		// contains filtered or unexported fields
	}
)
View Source
var (
	ClusterCollector = CollectorCollection{
		clusterSubsystem,
		clusterMetrics,
		collectClusterMetrics,
	}
)
View Source
var (
	ClusterGroupCollector = CollectorCollection{
		clusterGroupSubsystem,
		clusterGroupMetrics,
		collectClusterGroupMetrics,
	}
)
View Source
var (
	GitRepoCollector = CollectorCollection{
		gitRepoSubsystem,
		gitRepoMetrics,
		collectGitRepoMetrics,
	}
)
View Source
var (
	HelmCollector = CollectorCollection{
		helmSubsystem,
		helmMetrics,
		collectHelmMetrics,
	}
)

Functions

func RegisterGitOptsMetrics

func RegisterGitOptsMetrics()

func RegisterHelmOpsMetrics added in v0.12.0

func RegisterHelmOpsMetrics()

func RegisterMetrics

func RegisterMetrics()

Types

type CollectorCollection

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

CollectorCollection implements the generic methods `Delete` and `Register` for a collection of Prometheus collectors. It is used to manage the lifecycle of a collection of Prometheus collectors.

func (*CollectorCollection) Collect

Collect collects the metrics for the given object. It deletes the metrics for the object if they already exist and then collects the metrics for the object.

The metrics need to be deleted because the values of the metrics may have changed and this would create a new instance of those metrics, keeping the old one around. Metrics are deleted by their name and namespace label values.

func (*CollectorCollection) Delete

func (c *CollectorCollection) Delete(name, namespace string) (deleted int)

Delete deletes the metric with the given name and namespace labels. It returns the number of metrics deleted. It does a DeletePartialMatch on the metric with the given name and namespace labels.

func (*CollectorCollection) Register

func (c *CollectorCollection) Register()

type ObjCounterVec added in v0.13.0

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

ObjCounterVec is a wrapper around prometheus.CounterVec that adds a method to increment the counter for a given metav1 object. The labels of the metric are determined from the name and the

func ObjCounter added in v0.13.0

func ObjCounter(name, help string) (c ObjCounterVec)

ObjCounter creates and registers a new CounterVec metric with the given name and help text. The returned CounterVec embeds the CounterVec from the prometheus package and adds a method to increment the counter for a given object. The labels of the metric are determined from the name and the namespace of the given object.

func (*ObjCounterVec) DeleteByReq added in v0.13.0

func (m *ObjCounterVec) DeleteByReq(req ctrl.Request) bool

func (*ObjCounterVec) Inc added in v0.13.0

func (m *ObjCounterVec) Inc(obj metav1.Object)

type ObjGaugeVec added in v0.13.0

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

func ObjGauge added in v0.13.0

func ObjGauge(name, help string) (g ObjGaugeVec)

func (*ObjGaugeVec) Delete added in v0.13.0

func (m *ObjGaugeVec) Delete(obj metav1.Object) bool

func (*ObjGaugeVec) Set added in v0.13.0

func (m *ObjGaugeVec) Set(obj metav1.Object, value float64)

type ObjHistogramVec added in v0.13.0

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

func ObjHistogram added in v0.13.0

func ObjHistogram(name, help string, buckets []float64) (h ObjHistogramVec)

func (*ObjHistogramVec) DeleteByReq added in v0.13.0

func (m *ObjHistogramVec) DeleteByReq(req ctrl.Request) bool

func (*ObjHistogramVec) Observe added in v0.13.0

func (m *ObjHistogramVec) Observe(obj metav1.Object, value float64)

Jump to

Keyboard shortcuts

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