From 5764601655cf0a60a2baa1edaa7bf9487d69a563 Mon Sep 17 00:00:00 2001 From: Jeanette Tan Date: Mon, 9 Dec 2024 19:41:45 +0800 Subject: [PATCH] Update error message when using disabled PromQL experimental aggregation function Signed-off-by: Jeanette Tan --- promql/parser/parse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promql/parser/parse.go b/promql/parser/parse.go index e8abe9019..de85b5ea5 100644 --- a/promql/parser/parse.go +++ b/promql/parser/parse.go @@ -450,7 +450,7 @@ func (p *parser) newAggregateExpr(op Item, modifier, args Node) (ret *AggregateE if !EnableExperimentalFunctions && ret.Op.IsExperimentalAggregator() { // In mimir we return a custom message which doesn't mention the CLI flag that should be used to enable // experimental functions, given it's different (and in SaaS customers don't even have access to it). - p.addParseErrf(ret.PositionRange(), "limitk() and limit_ratio() functions are not enabled") + p.addParseErrf(ret.PositionRange(), `function %q is not enabled`, ret.Op) return } desiredArgs = 2