Documentation ¶
Index ¶
- func NewCounterVec(name, help string) *prometheus.CounterVec
- func NewMetricDescriptor(name, description string) *prometheus.Desc
- func RegisterControllerMetrics(metricsDesc *prometheus.Desc, scrapeFailureMetric *prometheus.CounterVec, ...)
- func RegisterWorkqueMetrics()
- type ControllerMetricsCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCounterVec ¶
func NewCounterVec(name, help string) *prometheus.CounterVec
NewCounterVec returns a new counter vector.
func NewMetricDescriptor ¶
func NewMetricDescriptor(name, description string) *prometheus.Desc
NewMetricDescriptor returns a new metric descriptor.
func RegisterControllerMetrics ¶
func RegisterControllerMetrics(metricsDesc *prometheus.Desc, scrapeFailureMetric *prometheus.CounterVec, controllers ...ControllerMetricsCollector)
RegisterControllerMetrics initializes the collection of Controller related metrics. This function ensures to run only once for avoiding multiple controller registration.
func RegisterWorkqueMetrics ¶
func RegisterWorkqueMetrics()
RegisterWorkqueMetrics creates and register a provider for workqueue metrics which is used to map the data collected by the workqueues to the proper metrics. The provider needs to be registered, before creating workqueues otherwise it wouldn't be noticed.
Types ¶
type ControllerMetricsCollector ¶
type ControllerMetricsCollector interface { // CollectMetrics is called by the controllerCollector when collecting metrics. // The implemtation sends the collected metrics to the given channel. CollectMetrics(ch chan<- prometheus.Metric) }
ControllerMetricsCollector is an interface implemented by any controller bundled in the Gardener Controller Manager which wants to expose metrics.