mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Use consts from alerting package (#61241)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
prometheusModel "github.com/prometheus/common/model"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
|
||||
alertingModels "github.com/grafana/alerting/alerting/models"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
@@ -517,9 +518,9 @@ func (sch *schedule) stopApplied(alertDefKey ngmodels.AlertRuleKey) {
|
||||
func (sch *schedule) getRuleExtraLabels(evalCtx *evaluation) map[string]string {
|
||||
extraLabels := make(map[string]string, 4)
|
||||
|
||||
extraLabels[ngmodels.NamespaceUIDLabel] = evalCtx.rule.NamespaceUID
|
||||
extraLabels[alertingModels.NamespaceUIDLabel] = evalCtx.rule.NamespaceUID
|
||||
extraLabels[prometheusModel.AlertNameLabel] = evalCtx.rule.Title
|
||||
extraLabels[ngmodels.RuleUIDLabel] = evalCtx.rule.UID
|
||||
extraLabels[alertingModels.RuleUIDLabel] = evalCtx.rule.UID
|
||||
|
||||
if !sch.disableGrafanaFolder {
|
||||
extraLabels[ngmodels.FolderTitleLabel] = evalCtx.folderTitle
|
||||
|
||||
Reference in New Issue
Block a user