metrics

package
v0.0.0-...-686bfca Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LabelStatus marks the status of a resource or completed task
	LabelStatus = "status"

	// LabelOutcome indicates whether the outcome of the operation was successful or not
	LabelOutcome = "outcome"

	// LabelOpcode indicates the kind of CES metric, could be CEP insert or remove
	LabelOpcode = "opcode"

	// LabelValueOutcomeSuccess is used as a successful outcome of an operation
	LabelValueOutcomeSuccess = "success"

	// LabelValueOutcomeFail is used as an unsuccessful outcome of an operation
	LabelValueOutcomeFail = "fail"

	// LabelValueOutcomeAlive is used as outcome of alive identity entries
	LabelValueOutcomeAlive = "alive"

	// LabelValueOutcomeDeleted is used as outcome of deleted identity entries
	LabelValueOutcomeDeleted = "deleted"

	// LabelValueCEPInsert is used to indicate the number of CEPs inserted in a CES
	LabelValueCEPInsert = "cepinserted"

	// LabelValueCEPRemove is used to indicate the number of CEPs removed from a CES
	LabelValueCEPRemove = "cepremoved"

	// LabelSourceCluster is the label for source cluster name
	LabelSourceCluster = "source_cluster"

	// LabelBuildQueueName is the name of the build queue
	LabelBuildQueueName = "name"

	// LabelEventMethod is the label for the method of an event
	LabelEventMethod = "method"
)
View Source
const Namespace = "cce_operator"

Namespace is the namespace key to use for cce operator metrics.

Variables

View Source
var (
	// IdentityGCSize records the identity GC results
	IdentityGCSize *prometheus.GaugeVec

	// IdentityGCRuns records how many times identity GC has run
	IdentityGCRuns *prometheus.GaugeVec

	// EndpointGCObjects records the number of times endpoint objects have been
	// garbage-collected.
	EndpointGCObjects *prometheus.CounterVec

	// CCEEndpointSliceDensity indicates the number of CEPs batched in a CES and it used to
	// collect the number of CEPs in CES at various buckets. For example,
	// number of CESs in the CEP range <0, 10>
	// number of CESs in the CEP range <11, 20>
	// number of CESs in the CEP range <21, 30> and so on
	CCEEndpointSliceDensity prometheus.Histogram

	// CCEEndpointsChangeCount indicates the total number of CEPs changed for every CES request sent to k8s-apiserver.
	// This metric is used to collect number of CEP changes happening at various buckets.
	CCEEndpointsChangeCount *prometheus.HistogramVec

	// CCEEndpointSliceSyncErrors used to track the total number of errors occurred during syncing CES with k8s-apiserver.
	CCEEndpointSliceSyncErrors prometheus.Counter

	// CCEEndpointSliceQueueDelay measures the time spent by CES's in the workqueue. This measures time difference between
	// CES insert in the workqueue and removal from workqueue.
	CCEEndpointSliceQueueDelay prometheus.Histogram

	// Cloud API
	CloudAPIRequestDurationMillisesconds prometheus.HistogramVec

	// WorkQuqueLens is the gauge representing the length of the work queue
	WorkQueueLens *prometheus.GaugeVec

	// WorkQueueEventCount is the counter of the number of events processed
	WorkQueueEventCount *prometheus.CounterVec

	// ControllerHandlerDurationMilliseconds is the histogram of the duration
	ControllerHandlerDurationMilliseconds *prometheus.HistogramVec
)
View Source
var (
	// Registry is the global prometheus registry for cce-operator metrics.
	Registry *prometheus.Registry
)

Functions

func DumpMetrics

func DumpMetrics() ([]*models.Metric, error)

DumpMetrics gets the current CCE operator metrics and dumps all into a Metrics structure. If metrics cannot be retrieved, returns an error.

func Register

func Register()

Register registers metrics for cce-operator.

func Unregister

func Unregister()

Unregister shuts down the metrics server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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