CloudWatch/Logs: Fix log alerts in new unified alerting (#36558)

* Pass FromAlert header from new alerting

* Add better error messages
This commit is contained in:
Andrej Ocenas
2021-07-09 13:43:22 +02:00
committed by GitHub
parent 56903582ce
commit ea2ba06b93
6 changed files with 22 additions and 19 deletions
+1 -4
View File
@@ -21,10 +21,7 @@ func (e *cloudWatchExecutor) executeAnnotationQuery(ctx context.Context, model *
namespace := model.Get("namespace").MustString("")
metricName := model.Get("metricName").MustString("")
dimensions := model.Get("dimensions").MustMap()
statistics, err := parseStatistics(model)
if err != nil {
return nil, err
}
statistics := parseStatistics(model)
period := int64(model.Get("period").MustInt(0))
if period == 0 && !usePrefixMatch {
period = 300