Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BucketsLatency = []float64{.1, .2, .5, 1, 2, 5, 10, 30}
var ( BundleCollector = CollectorCollection{ // contains filtered or unexported fields } )
var ( BundleDeploymentCollector = CollectorCollection{ // contains filtered or unexported fields } )
var (
ClusterCollector = CollectorCollection{
clusterSubsystem,
clusterMetrics,
collectClusterMetrics,
}
)
var (
ClusterGroupCollector = CollectorCollection{
clusterGroupSubsystem,
clusterGroupMetrics,
collectClusterGroupMetrics,
}
)
var (
GitRepoCollector = CollectorCollection{
gitRepoSubsystem,
gitRepoMetrics,
collectGitRepoMetrics,
}
)
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 ¶
func (c *CollectorCollection) Collect(ctx context.Context, obj metav1.ObjectMetaAccessor)
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)
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