/
collectors.go
36 lines (32 loc) · 1.08 KB
/
collectors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package controller
import "github.com/prometheus/client_golang/prometheus"
// NewInternalCollectorCurrentlyQueuedTasksCount returns a new collector for the mre_currently_queued_tasks_count metric.
func NewInternalCollectorCurrentlyQueuedTasksCount() prometheus.Collector {
return prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mre_currently_queued_tasks_count",
Help: "Number of tasks in the queue",
},
[]string{},
)
}
// NewInternalCollectorExecutedTasksCount returns a new collector for the mre_executed_tasks_count metric.
func NewInternalCollectorExecutedTasksCount() prometheus.Collector {
return prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mre_executed_tasks_count",
Help: "Number of tasks executed",
},
[]string{},
)
}
// NewInternalCollectorMetricsCount returns a new collector for the mre_metrics_count metric.
func NewInternalCollectorMetricsCount() prometheus.Collector {
return prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Name: "mre_metrics_count",
Help: "Number of GitLab pipelines metrics being exported",
},
[]string{},
)
}