metrics

package
v0.0.0-...-26d813d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Succeeded label for JobResultStats.
	Succeeded = "succeeded"
	// Failed label for JobResultStats.
	Failed = "failed"
)

Variables

View Source
var (
	// JobRequeueCount record the count of a kuscia job requeue.
	JobRequeueCount = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "kuscia_job_requeue_count",
		Help: "Counts number of KusciaJob requeue",
	}, []string{"job_name"})

	// JobWorkerQueueSize record the kuscia job worker queue size.
	JobWorkerQueueSize = promauto.NewGauge(prometheus.GaugeOpts{
		Name: "kuscia_job_worker_queue_size",
		Help: "Size of KusciaJob worker queue",
	})

	// JobSyncDurations record sync handle time duration of kuscia jobs.
	JobSyncDurations = promauto.NewSummaryVec(
		prometheus.SummaryOpts{
			Name:       "kuscia_job_sync_durations_seconds",
			Help:       "Sync latency distributions of kuscia jobs.",
			Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
		},
		[]string{"phase", "result"},
	)

	// JobResultStats record the count of succeeded or failed kuscia jobs.
	JobResultStats = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "kuscia_job_result_stats",
			Help: "Counts number of succeeded or failed kuscia jobs",
		},
		[]string{"result"},
	)
)

Functions

func ClearDeadMetrics

func ClearDeadMetrics(key string)

ClearDeadMetrics clear requeue count of a kuscia job.

Types

This section is empty.

Jump to

Keyboard shortcuts

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