Alerting: Move debug log line to where alert rules are updated (#52318)

This commit is contained in:
George Robinson 2022-07-18 16:27:06 +01:00 committed by GitHub
parent 38ec4c0a09
commit e7feff6d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -47,6 +47,7 @@ func (sch *schedule) updateSchedulableAlertRules(ctx context.Context) error {
if err := sch.ruleStore.GetAlertRulesForScheduling(ctx, &q); err != nil {
return fmt.Errorf("failed to get alert rules: %w", err)
}
sch.log.Debug("alert rules fetched", "count", len(q.Result))
sch.schedulableAlertRules.set(q.Result)
return nil
}

View File

@ -228,8 +228,6 @@ func (sch *schedule) schedulePeriodic(ctx context.Context) error {
}
alertRules := sch.schedulableAlertRules.all()
sch.log.Debug("alert rules fetched", "count", len(alertRules))
// registeredDefinitions is a map used for finding deleted alert rules
// initially it is assigned to all known alert rules from the previous cycle
// each alert rule found also in this cycle is removed