Alerting: Use logger with context in the state cache (#65663)

This commit is contained in:
Yuri Tseretyan 2023-03-31 10:11:30 -04:00 committed by GitHub
parent be9361cb9e
commit 622c23716a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,7 +259,7 @@ func (st *Manager) ProcessEvalResults(ctx context.Context, evaluatedAt time.Time
// Set the current state based on evaluation results
func (st *Manager) setNextState(ctx context.Context, alertRule *ngModels.AlertRule, result eval.Result, extraLabels data.Labels, logger log.Logger) StateTransition {
currentState := st.cache.getOrCreate(ctx, st.log, alertRule, result, extraLabels, st.externalURL)
currentState := st.cache.getOrCreate(ctx, logger, alertRule, result, extraLabels, st.externalURL)
currentState.LastEvaluationTime = result.EvaluatedAt
currentState.EvaluationDuration = result.EvaluationDuration