Alerting: State manager to use InstanceStore (#53852)

* move saving the state to state manager when scheduler stops
* move saving state to ProcessEvalResults

* add GetRuleKey to State
* add LogContext to AlertRuleKey
This commit is contained in:
Yuriy Tseretyan
2022-08-18 09:40:33 -04:00
committed by GitHub
parent 86de94cbfa
commit 9f90a7b54d
8 changed files with 218 additions and 45 deletions

View File

@@ -227,6 +227,10 @@ type AlertRuleKey struct {
UID string `xorm:"uid"`
}
func (k AlertRuleKey) LogContext() []interface{} {
return []interface{}{"rule_uid", k.UID, "org_id", k.OrgID}
}
type AlertRuleKeyWithVersion struct {
Version int64
AlertRuleKey `xorm:"extends"`