Alerting: Change __value__ label to __value_string__ annotation and add ValueString variable in notifications (#36032)

* Alerting: Allow __value__ label in notifications
was being removed by removePrivateItems
discoverd in #36020, but issue is not about that specifically

* __value__ label to __value_string__ annotation
and .ValueString extended property for notifications
This commit is contained in:
Kyle Brandt
2021-06-24 03:15:49 -04:00
committed by GitHub
parent fa46c877a9
commit 19f764739b
4 changed files with 16 additions and 6 deletions

View File

@@ -166,7 +166,7 @@ func executeCondition(ctx AlertExecCtx, c *models.Condition, now time.Time, data
return ExecutionResults{Error: err}
}
// eval captures for the '__value__' label.
// eval captures for the '__value_string__' annotation and the Value property of the API response.
captures := make([]NumberValueCapture, 0, len(execResp.Responses))
captureVal := func(refID string, labels data.Labels, value *float64) {