Skip to content

Commit

Permalink
chore: add log on skipping alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Mar 12, 2024
1 parent c09fe72 commit 950848a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flow/alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ func (a *Alerter) checkAndAddAlertToCatalog(ctx context.Context, alertConfigId i
}
return true
}

logger.LoggerFromCtx(ctx).Info(
fmt.Sprintf("Skipeed sending alerts: last alert was sent at %s, which was >=%s ago",
createdTimestamp.String(), dur.String()))
return false
}

Expand Down
1 change: 1 addition & 0 deletions flow/alerting/email_alert_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package alerting
import (
"context"
"fmt"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ses"
"github.com/aws/aws-sdk-go-v2/service/ses/types"
Expand Down

0 comments on commit 950848a

Please sign in to comment.