Alerting: Add header X-Grafana-Org-Id to evaluation requests (#58972)

This commit is contained in:
Yuri Tseretyan 2022-11-21 04:13:44 -05:00 committed by GitHub
parent 4aa5dea96b
commit b57689e07e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,6 +226,7 @@ func buildDatasourceHeaders(ctx EvaluationContext) map[string]string {
key, ok := models.RuleKeyFromContext(ctx.Ctx)
if ok {
headers["X-Rule-Uid"] = key.UID
headers["X-Grafana-Org-Id"] = strconv.FormatInt(key.OrgID, 10)
}
return headers