mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
actually register metrics this time (#34444)
This commit is contained in:
parent
afbd4dec52
commit
8f350bc353
@ -81,7 +81,7 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
|
||||
}),
|
||||
// TODO: once rule groups support multiple rules, consider partitioning
|
||||
// on rule group as well as tenant, similar to loki|cortex.
|
||||
EvalTotal: prometheus.NewCounterVec(
|
||||
EvalTotal: promauto.With(r).NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Namespace: "grafana",
|
||||
Subsystem: "alerting",
|
||||
@ -92,7 +92,7 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
|
||||
),
|
||||
// TODO: once rule groups support multiple rules, consider partitioning
|
||||
// on rule group as well as tenant, similar to loki|cortex.
|
||||
EvalFailures: prometheus.NewCounterVec(
|
||||
EvalFailures: promauto.With(r).NewCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Namespace: "grafana",
|
||||
Subsystem: "alerting",
|
||||
@ -101,7 +101,7 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
|
||||
},
|
||||
[]string{"user"},
|
||||
),
|
||||
EvalDuration: prometheus.NewSummaryVec(
|
||||
EvalDuration: promauto.With(r).NewSummaryVec(
|
||||
prometheus.SummaryOpts{
|
||||
Namespace: "grafana",
|
||||
Subsystem: "alerting",
|
||||
@ -113,7 +113,7 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
|
||||
),
|
||||
// TODO: once rule groups support multiple rules, consider partitioning
|
||||
// on rule group as well as tenant, similar to loki|cortex.
|
||||
GroupRules: prometheus.NewGaugeVec(
|
||||
GroupRules: promauto.With(r).NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Namespace: "grafana",
|
||||
Subsystem: "alerting",
|
||||
|
Loading…
Reference in New Issue
Block a user