in registry/gc/internal/metrics/metrics.go [60:142]
func init() {
runDurationHist = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: runDurationName,
Help: runDurationDesc,
Buckets: prometheus.DefBuckets,
},
[]string{workerLabel, noopLabel, errorLabel, danglingLabel, eventLabel},
)
runCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: runTotalName,
Help: runTotalDesc,
},
[]string{workerLabel, noopLabel, errorLabel, danglingLabel, eventLabel},
)
deleteDurationHist = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: deleteDurationName,
Help: deleteDurationDesc,
Buckets: prometheus.DefBuckets,
},
[]string{backendLabel, artifactLabel, errorLabel},
)
deleteCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: deleteTotalName,
Help: deleteTotalDesc,
},
[]string{backendLabel, artifactLabel},
)
storageDeleteBytesCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: storageDeleteBytesTotalName,
Help: storageDeleteBytesTotalDesc,
},
[]string{mediaTypeLabel},
)
postponeCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: postponeTotalName,
Help: postponeTotalDesc,
},
[]string{workerLabel},
)
sleepDurationHist = prometheus.NewHistogramVec(
prometheus.HistogramOpts{
Namespace: metrics.NamespacePrefix,
Subsystem: subsystem,
Name: sleepDurationName,
Help: sleepDurationDesc,
// 500ms to 24h
Buckets: []float64{.5, 1, 5, 15, 30, 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400},
},
[]string{workerLabel},
)
prometheus.MustRegister(runDurationHist)
prometheus.MustRegister(runCounter)
prometheus.MustRegister(deleteDurationHist)
prometheus.MustRegister(deleteCounter)
prometheus.MustRegister(postponeCounter)
prometheus.MustRegister(storageDeleteBytesCounter)
prometheus.MustRegister(sleepDurationHist)
}