SSE/Alerting: Support prom instant vector responses (#44865)

* SSE/Alerting: (Draft) Support prom instant vector responses
fixes #35663
* reduce\classic expressions to handle mathexp.Number
* use Notice for warning

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
Kyle Brandt
2022-05-23 10:08:14 -04:00
committed by GitHub
parent 0215195e6d
commit 01ef899753
10 changed files with 245 additions and 19 deletions

View File

@@ -100,6 +100,11 @@ func GetReduceFunc(rFunc string) (ReducerFunc, error) {
}
}
// GetSupportedReduceFuncs returns collection of supported function names
func GetSupportedReduceFuncs() []string {
return []string{"sum", "mean", "min", "max", "count", "last"}
}
// Reduce turns the Series into a Number based on the given reduction function
// if ReduceMapper is defined it applies it to the provided series and performs reduction of the resulting series.
// Otherwise, the reduction operation is done against the original series.