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
+4
View File
@@ -117,6 +117,10 @@ type AlertExecCtx struct {
func GetExprRequest(ctx AlertExecCtx, data []models.AlertQuery, now time.Time) (*expr.Request, error) {
req := &expr.Request{
OrgId: ctx.OrgID,
Headers: map[string]string{
// Some data sources check this in query method as sometimes alerting needs special considerations.
"FromAlert": "true",
},
}
for i := range data {