mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 22:00:02 +00:00
TUN-5703: Add prometheus metric for current configuration version
This commit is contained in:
25
orchestration/metrics.go
Normal file
25
orchestration/metrics.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package orchestration
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
const (
|
||||
MetricsNamespace = "cloudflared"
|
||||
MetricsSubsystem = "orchestration"
|
||||
)
|
||||
|
||||
var (
|
||||
configVersion = prometheus.NewGauge(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: MetricsNamespace,
|
||||
Subsystem: MetricsSubsystem,
|
||||
Name: "config_version",
|
||||
Help: "Configuration Version",
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
func init() {
|
||||
prometheus.MustRegister(configVersion)
|
||||
}
|
Reference in New Issue
Block a user