metrics

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelIntuit     = "intuit_alert"
	LabelVersion    = "version"
	LabelType       = "type"
	LabelPhase      = "phase"
	LabelK8SVersion = "K8SVersion"
)

Variables

This section is empty.

Functions

func AddMetricsTransportWrapper added in v0.4.0

func AddMetricsTransportWrapper(metrics *CustomMetrics, config *rest.Config) *rest.Config

AddMetricsTransportWrapper adds a transport wrapper which increments 'numaplane_app_k8s_request_total' counter on each kubernetes request

Types

type CustomMetrics

type CustomMetrics struct {
	// PipelinesRunning is the gauge for the number of running pipelines.
	PipelinesRunning *prometheus.GaugeVec
	// PipelineCounterMap contains the information of all running pipelines with "name_namespace" as a key.
	PipelineCounterMap map[string]struct{}
	// PipelinesSyncFailed is the counter for the total number of failed synced.
	PipelinesSyncFailed *prometheus.CounterVec
	// PipelineRolloutQueueLength is the gauge for the length of pipeline rollout queue.
	PipelineRolloutQueueLength *prometheus.GaugeVec
	// PipelinesSynced is the counter for the total number of pipelines synced.
	PipelinesSynced *prometheus.CounterVec
	// ISBServicesRunning is the gauge for the number of running ISB services.
	ISBServicesRunning *prometheus.GaugeVec
	// ISBServiceCounterMap contains the information of all running isb services with "name_namespace" as a key.
	ISBServiceCounterMap map[string]struct{}
	// ISBServicesSyncFailed is the counter for the total number of ISB service syncing failed.
	ISBServicesSyncFailed *prometheus.CounterVec
	// ISBServicesSynced is the counter for the total number of ISB service synced.
	ISBServicesSynced *prometheus.CounterVec
	// NumaflowControllerVersionCounter contains the information of all running numaflow controllers with "version" as a key and "name_namespace" as a value.
	NumaflowControllerVersionCounter map[string]map[string]struct{}
	// NumaflowControllerRunning is the gauge for the number of running numaflow controllers with a specific version.
	NumaflowControllerRunning *prometheus.GaugeVec
	// NumaflowControllersSyncFailed is the counter for the total number of Numaflow controller syncing failed.
	NumaflowControllersSyncFailed *prometheus.CounterVec
	// NumaflowControllersSynced in the counter for the total number of Numaflow controllers synced.
	NumaflowControllersSynced *prometheus.CounterVec
	// ReconciliationDuration is the histogram for the duration of pipeline, isb service and numaflow controller reconciliation.
	ReconciliationDuration *prometheus.HistogramVec
	// NumaflowControllerKubectlExecutionCounter Count the number of kubectl executions during numaflow controller reconciliation
	NumaflowControllerKubectlExecutionCounter *prometheus.CounterVec
	// KubeRequestCounter Count the number of kubernetes requests during reconciliation
	KubeRequestCounter *prometheus.CounterVec
	// KubeResourceMonitored count the number of monitored kubernetes resource objects in cache
	KubeResourceMonitored *prometheus.GaugeVec
	// KubeResourceCache count the number of kubernetes resource objects in cache
	KubeResourceCache *prometheus.GaugeVec
	// ClusterCacheError count the total number of cluster cache errors
	ClusterCacheError *prometheus.CounterVec
}

func RegisterCustomMetrics

func RegisterCustomMetrics() *CustomMetrics

RegisterCustomMetrics registers the custom metrics to the existing global prometheus registry for pipelines, ISB service and numaflow controller

func (*CustomMetrics) DecISBServiceMetrics

func (m *CustomMetrics) DecISBServiceMetrics(name, namespace string)

DecISBServiceMetrics decrements the ISBService counter

func (*CustomMetrics) DecNumaflowControllerMetrics

func (m *CustomMetrics) DecNumaflowControllerMetrics(name, namespace, version string)

DecNumaflowControllerMetrics decrements the Numaflow Controller counter

func (*CustomMetrics) DecPipelineMetrics

func (m *CustomMetrics) DecPipelineMetrics(name, namespace string)

DecPipelineMetrics decrements the pipeline counter

func (*CustomMetrics) IncISBServiceMetrics

func (m *CustomMetrics) IncISBServiceMetrics(name, namespace string)

IncISBServiceMetrics increments the ISBService counter if it doesn't already know about the ISBService

func (*CustomMetrics) IncNumaflowControllerMetrics

func (m *CustomMetrics) IncNumaflowControllerMetrics(name, namespace, version string)

IncNumaflowControllerMetrics increments the Numaflow Controller counter if it doesn't already know about the Numaflow Controller

func (*CustomMetrics) IncPipelinesRunningMetrics added in v0.4.0

func (m *CustomMetrics) IncPipelinesRunningMetrics(name, namespace string)

IncPipelinesRunningMetrics increments the pipeline counter if it doesn't already know about the pipeline

Jump to

Keyboard shortcuts

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