Alerting: Metrics should have the label `org` instead of `user` (#39353)

An user within Grafana has a completely different meaning. Multi-tenancy is done via Organizations as a top-level concept.
This commit is contained in:
gotjosh 2021-09-17 17:17:26 +01:00 committed by GitHub
parent ef36bbbfbd
commit 35e5bfce40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ func newSchedulerMetrics(r prometheus.Registerer) *Scheduler {
Name: "rule_evaluations_total",
Help: "The total number of rule evaluations.",
},
[]string{"user"},
[]string{"org"},
),
// TODO: once rule groups support multiple rules, consider partitioning
// on rule group as well as tenant, similar to loki|cortex.
@ -140,7 +140,7 @@ func newSchedulerMetrics(r prometheus.Registerer) *Scheduler {
Name: "rule_evaluation_failures_total",
Help: "The total number of rule evaluation failures.",
},
[]string{"user"},
[]string{"org"},
),
EvalDuration: promauto.With(r).NewSummaryVec(
prometheus.SummaryOpts{
@ -150,7 +150,7 @@ func newSchedulerMetrics(r prometheus.Registerer) *Scheduler {
Help: "The duration for a rule to execute.",
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
},
[]string{"user"},
[]string{"org"},
),
}
}
@ -166,7 +166,7 @@ func newStateMetrics(r prometheus.Registerer) *State {
Name: "rule_group_rules",
Help: "The number of rules.",
},
[]string{"user"},
[]string{"org"},
),
AlertState: promauto.With(r).NewGaugeVec(prometheus.GaugeOpts{
Namespace: Namespace,