Add approx_topk and multi-variant expressions to LogQL parser#882
Add approx_topk and multi-variant expressions to LogQL parser#882btaani wants to merge 5 commits intoobservatorium:mainfrom
Conversation
|
/hold |
There was a problem hiding this comment.
approx_topk seems to still be in experimental feature according to the docs. It works when sent directly to the querier, but fails with parse error at line 1, col 1: syntax error: unexpected IDENTIFIER when sent through query-frontend.
I verified this by calling both components directly over mTLS with the same query: the querier returned 200 and valid results, while the query-frontend returned 400. This points to a query-frontend bug... likely related to approx_topk being rewritten into internal non-LogQL expressions during frontend processing and then reparsed on a code path that expects normal LogQL.
/cc @xperimental with this shall we add support for approx_topk? I'm on the fence because I'm not sure if grafana will eventually support it or drop it... at the same time if we don't add support we would need to remember that
multi-variant worked perfectly 👌
Add support for LogQL features included in Loki between v3.1.0 and v3.6.5
feat: Introduce shardable probabilistic topk for instant queries. (backport k227) grafana/loki#14765
chore: add multi-variant query support to LogQL grafana/loki#16196
Ref: LOG-8712