metrics

package
v0.80.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudMetrics

type CloudMetrics struct {
	// API
	APIRequestsCounter prometheus.Counter
	APITimesHistograms *prometheus.HistogramVec

	// Installation
	InstallationCreationDurationHist    *prometheus.HistogramVec
	InstallationUpdateDurationHist      *prometheus.HistogramVec
	InstallationHibernationDurationHist *prometheus.HistogramVec
	InstallationWakeUpDurationHist      *prometheus.HistogramVec
	InstallationDeletionDurationHist    *prometheus.HistogramVec

	// ClusterInstallation
	ClusterInstallationReconcilingDurationHist *prometheus.HistogramVec
	ClusterInstallationDeletionDurationHist    *prometheus.HistogramVec

	// Cluster
	ClusterCreationDurationHist     *prometheus.HistogramVec
	ClusterUpgradeDurationHist      *prometheus.HistogramVec
	ClusterProvisioningDurationHist *prometheus.HistogramVec
	ClusterResizeDurationHist       *prometheus.HistogramVec
	ClusterDeletionDurationHist     *prometheus.HistogramVec
}

CloudMetrics holds all of the metrics needed to properly instrument the Provisioning server

func New

func New() *CloudMetrics

New creates a new Prometheus-based Metrics object to be used throughout the Provisioner in order to record various performance metrics

func (*CloudMetrics) IncrementAPIRequest added in v0.60.0

func (cm *CloudMetrics) IncrementAPIRequest()

IncrementAPIRequest increases APIRequestsCounter by one.

func (*CloudMetrics) ObserveAPIEndpointDuration added in v0.60.0

func (cm *CloudMetrics) ObserveAPIEndpointDuration(handler, method string, statusCode int, elapsed float64)

ObserveAPIEndpointDuration observes the duration of an API request.

Jump to

Keyboard shortcuts

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