I find a method is func ParseExpr(input string) (expr Expr, err error)  
<https://github.com/prometheus/prometheus/blob/8b64b70fe4a5aa2877c95aa12c6798b12d3ff7ec/promql/parser/parse.go#L105>,
 
but still need to resolve each type and add a matcher to each type.

Does anyone know an easier way?
在2020年12月2日星期三 UTC+8 上午11:51:10<Allenzh li> 写道:

> Hi, recently, I want to add a label to all alerting expr, is there any way 
> to acheive that? 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/ef0adb47-35f3-4665-9e6d-6ba8943e1a9cn%40googlegroups.com.

Reply via email to