format all prometheus metrics to ensure nice indent

Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
This commit is contained in:
Benjamin Wang
2025-01-29 13:42:06 +00:00
parent 35d20d1e08
commit 614640f1c2
11 changed files with 310 additions and 245 deletions

View File

@ -44,12 +44,13 @@ var (
Name: "leader_changes_seen_total",
Help: "The number of leader changes seen.",
})
learnerPromoteFailed = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "learner_promote_failures",
Help: "The total number of failed learner promotions (likely learner not ready) while this member is leader.",
},
learnerPromoteFailed = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "learner_promote_failures",
Help: "The total number of failed learner promotions (likely learner not ready) while this member is leader.",
},
[]string{"Reason"},
)
learnerPromoteSucceed = prometheus.NewCounter(prometheus.CounterOpts{
@ -112,29 +113,33 @@ var (
Name: "lease_expired_total",
Help: "The total number of expired leases.",
})
currentVersion = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "version",
Help: "Which version is running. 1 for 'server_version' label with current version.",
},
[]string{"server_version"})
currentGoVersion = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "go_version",
Help: "Which Go version server is running with. 1 for 'server_go_version' label with current version.",
},
[]string{"server_go_version"})
serverID = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "id",
Help: "Server or member ID in hexadecimal format. 1 for 'server_id' label with current ID.",
},
[]string{"server_id"})
currentVersion = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "version",
Help: "Which version is running. 1 for 'server_version' label with current version.",
},
[]string{"server_version"},
)
currentGoVersion = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "go_version",
Help: "Which Go version server is running with. 1 for 'server_go_version' label with current version.",
},
[]string{"server_go_version"},
)
serverID = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "etcd",
Subsystem: "server",
Name: "id",
Help: "Server or member ID in hexadecimal format. 1 for 'server_id' label with current ID.",
},
[]string{"server_id"},
)
fdUsed = prometheus.NewGauge(prometheus.GaugeOpts{
Namespace: "os",
Subsystem: "fd",