metrics

package
v0.11.0-rc.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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,
	}
)

Functions

func RegisterGitOptsMetrics

func RegisterGitOptsMetrics()

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()

Jump to

Keyboard shortcuts

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