mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add metric for provisioner daemons (#7858)
This commit is contained in:
@@ -140,6 +140,12 @@ func NewMetrics(reg prometheus.Registerer) Metrics {
|
||||
Name: "jobs_current",
|
||||
Help: "The number of currently running provisioner jobs.",
|
||||
}, []string{"provisioner"}),
|
||||
NumDaemons: auto.NewGauge(prometheus.GaugeOpts{
|
||||
Namespace: "coderd",
|
||||
Subsystem: "provisionerd",
|
||||
Name: "num_daemons",
|
||||
Help: "The number of provisioner daemons.",
|
||||
}),
|
||||
JobTimings: auto.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: "coderd",
|
||||
Subsystem: "provisionerd",
|
||||
|
||||
@@ -88,6 +88,7 @@ type Runner struct {
|
||||
|
||||
type Metrics struct {
|
||||
ConcurrentJobs *prometheus.GaugeVec
|
||||
NumDaemons prometheus.Gauge
|
||||
// JobTimings also counts the total amount of jobs.
|
||||
JobTimings *prometheus.HistogramVec
|
||||
// WorkspaceBuilds counts workspace build successes and failures.
|
||||
|
||||
Reference in New Issue
Block a user