metrics

package
v0.0.0-...-65e0918 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InternalRequestAttemptConcurrentTotal = prometheus.NewGauge(
		prometheus.GaugeOpts{
			Name: "internal_request_attempt_concurrent_requests",
			Help: "Total number of concurrent InternalRequest attempts",
		},
	)

	InternalRequestAttemptDurationSeconds = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "internal_request_attempt_duration_seconds",
			Help:    "Time from the moment the InternalRequest starts being processed until it completes",
			Buckets: []float64{10, 20, 40, 60, 150, 300, 450, 900, 1800, 3600},
		},
		[]string{"request", "namespace", "reason", "succeeded"},
	)

	InternalRequestAttemptTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "internal_request_attempt_total",
			Help: "Total number of InternalRequests processed by the operator",
		},
		[]string{"request", "namespace", "reason", "succeeded"},
	)
)

Functions

func RegisterCompletedInternalRequest

func RegisterCompletedInternalRequest(request, namespace, reason string, startTime, completionTime *metav1.Time, succeeded bool)

RegisterCompletedInternalRequest decrements the 'internal_request_attempt_concurrent_total' metric, increments `internal_request_attempt_total` and registers a new observation for 'internal_request_attempt_duration_seconds' with the elapsed time from the moment the InternalRequest attempt started (InternalRequest marked as 'Running').

func RegisterNewInternalRequest

func RegisterNewInternalRequest(creationTime metav1.Time, startTime *metav1.Time)

RegisterNewInternalRequest increments the number of the 'internal_request_attempt_concurrent_total' metric which represents the number of concurrent running InternalRequests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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