monitoring

package
v0.20.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FunctionMeshControllerReconcileCount will count how many reconcile operations been done.
	FunctionMeshControllerReconcileCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: metricDescription["FunctionMeshControllerReconcileCount"].Name,
			Help: metricDescription["FunctionMeshControllerReconcileCount"].Help,
		}, []string{"type", "name", "namespace"},
	)

	// FunctionMeshControllerReconcileLatency will measure the latency of reconcile operations.
	FunctionMeshControllerReconcileLatency = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name: metricDescription["FunctionMeshControllerReconcileLatency"].Name,
			Help: metricDescription["FunctionMeshControllerReconcileLatency"].Help,

			Buckets: []float64{
				10, 100, 1000, 10000, 30000, 60000,
			},
		}, []string{"type", "name", "namespace"},
	)
)

Functions

func RegisterMetrics

func RegisterMetrics()

RegisterMetrics will register metrics with the global prometheus registry

Types

type MetricDescription

type MetricDescription struct {
	Name string
	Help string
	Type string
}

MetricDescription is an exported struct that defines the metric description (Name, Help) as a new type named MetricDescription.

func ListMetrics

func ListMetrics() []MetricDescription

ListMetrics will create a slice with the metrics available in metricDescription

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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