feat: add metric for provisioner daemons (#7858)

This commit is contained in:
goodspark
2023-06-06 16:50:11 -05:00
committed by GitHub
parent 4954052ff6
commit 0665a6c2f2
3 changed files with 8 additions and 0 deletions
+6
View File
@@ -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",
+1
View File
@@ -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.