metrics

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 2 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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