metrics

package
v1.11.7 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	GCProcess   = "GC"
	SyncProcess = "Sync"
)

Variables

View Source
var (
	NegOperationLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: negControllerSubsystem,
			Name:      negOpLatencyKey,
			Help:      "Latency of a NEG Operation",

			Buckets: prometheus.ExponentialBuckets(1, 2, 13),
		},
		negOpLatencyMetricsLabels,
	)

	NegOperationEndpoints = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: negControllerSubsystem,
			Name:      negOpEndpointsKey,
			Help:      "Number of Endpoints during an NEG Operation",
		},
		negOpEndpointsMetricsLabels,
	)

	SyncerSyncLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: negControllerSubsystem,
			Name:      syncerLatencyKey,
			Help:      "Sync latency for NEG Syncer",

			Buckets: prometheus.ExponentialBuckets(1, 2, 13),
		},
		syncerMetricsLabels,
	)

	ManagerProcessLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Subsystem: negControllerSubsystem,
			Name:      managerProcessLatencyKey,
			Help:      "Process latency for NEG Manager",

			Buckets: prometheus.ExponentialBuckets(1, 2, 13),
		},
		negProcessMetricsLabels,
	)

	InitializationLatency = prometheus.NewHistogram(
		prometheus.HistogramOpts{
			Subsystem: negControllerSubsystem,
			Name:      initLatencyKey,
			Help:      "Initialization latency of a NEG",

			Buckets: prometheus.ExponentialBuckets(1, 2, 13),
		},
	)

	LastSyncTimestamp = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Subsystem: negControllerSubsystem,
			Name:      lastSyncTimestampKey,
			Help:      "The timestamp of the last execution of NEG controller sync loop.",
		},
	)
)

Functions

func PublishNegInitializationMetrics added in v1.10.2

func PublishNegInitializationMetrics(latency time.Duration)

PublishNegInitializationMetrics publishes collected metrics for time from request to initialization of NEG

func PublishNegManagerProcessMetrics added in v1.10.2

func PublishNegManagerProcessMetrics(process string, err error, start time.Time)

PublishNegManagerProcessMetrics publishes collected metrics for the neg manager loops

func PublishNegOperationMetrics added in v1.10.2

func PublishNegOperationMetrics(operation, negType, apiVersion string, err error, numEndpoints int, start time.Time)

PublishNegOperationMetrics publishes collected metrics for neg operations

func PublishNegSyncMetrics added in v1.10.2

func PublishNegSyncMetrics(negType, endpointCalculator string, err error, start time.Time)

PublishNegSyncMetrics publishes collected metrics for the sync of NEG

func RegisterMetrics

func RegisterMetrics()

Types

This section is empty.

Jump to

Keyboard shortcuts

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