Commit d7f11c30 by bergquist

tech(alerting): set prev state when creating eval context

parent 489f087f
......@@ -39,6 +39,7 @@ func NewEvalContext(alertCtx context.Context, rule *Rule) *EvalContext {
Logs: make([]*ResultLogEntry, 0),
EvalMatches: make([]*EvalMatch, 0),
log: log.New("alerting.evalContext"),
PrevAlertState: rule.State,
}
}
......
......@@ -59,8 +59,6 @@ func (handler *DefaultResultHandler) GetStateFromEvaluation(evalContext *EvalCon
}
func (handler *DefaultResultHandler) Handle(evalContext *EvalContext) error {
evalContext.PrevAlertState = evalContext.Rule.State
executionError := ""
annotationData := simplejson.New()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment