You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query, query-frontend, ruler: Add support for flags to use promQL experimental functions & bump promql-engine (thanos-io#8245)
* feat: add support for experimental functions, if enabled
Signed-off-by: Saumya Shah <[email protected]>
* fix tests
Signed-off-by: Saumya Shah <[email protected]>
* allow setting enable-feature flag in ruler
Signed-off-by: Saumya Shah <[email protected]>
* add flag info in docs
Signed-off-by: Saumya Shah <[email protected]>
* add CHANGELOG
Signed-off-by: Saumya Shah <[email protected]>
* add hidden flag to throw err on query fallback, red in tests ^_^
Signed-off-by: Saumya Shah <[email protected]>
* bump promql-engine to latest version/commit
Signed-off-by: Saumya Shah <[email protected]>
* format docs
Signed-off-by: Saumya Shah <[email protected]>
---------
Signed-off-by: Saumya Shah <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
17
17
### Added
18
18
19
19
-[#8238](https://github.com/thanos-io/thanos/pull/8238) Receive: add shuffle sharding support
20
+
-[#8245](https://github.com/thanos-io/thanos/pull/8245) Querier/Query-Frontend/Ruler: Add `--enable-feature=promql-experimental-functions` flag option to enable using promQL experimental functions in respective Thanos components
disableQueryFallback:=cmd.Flag("query.disable-fallback", "If set then thanos engine will throw an error if query falls back to prometheus engine").Hidden().Default("false").Bool()
87
+
84
88
extendedFunctionsEnabled:=cmd.Flag("query.enable-x-functions", "Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine.").Default("false").Bool()
85
89
promqlQueryMode:=cmd.Flag("query.mode", "PromQL query mode. One of: local, distributed.").
activeQueryDir:=cmd.Flag("query.active-query-path", "Directory to log currently active queries in the queries.active file.").Default("").String()
137
141
138
-
featureList:=cmd.Flag("enable-feature", "Comma separated experimental feature names to enable.The current list of features is empty.").Hidden().Default("").Strings()
142
+
featureList:=cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions in query)").Default("").Strings()
139
143
140
144
enableExemplarPartialResponse:=cmd.Flag("exemplar.partial-response", "Enable partial response for exemplar endpoint. --no-exemplar.partial-response for disabling.").
cmd.Flag("query-frontend.enable-x-functions", "Enable experimental x- functions in query-frontend. --no-query-frontend.enable-x-functions for disabling.").
98
98
Default("false").BoolVar(&cfg.EnableXFunctions)
99
99
100
+
cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions in query-frontend)").Default("").StringsVar(&cfg.EnableFeatures)
101
+
100
102
cmd.Flag("query-range.max-query-length", "Limit the query time range (end - start time) in the query-frontend, 0 disables it.").
cmd.Flag("query.enable-x-functions", "Whether to enable extended rate functions (xrate, xincrease and xdelta). Only has effect when used with Thanos engine.").Default("false").BoolVar(&conf.extendedFunctionsEnabled)
169
+
cmd.Flag("enable-feature", "Comma separated feature names to enable. Valid options for now: promql-experimental-functions (enables promql experimental functions for ruler)").Default("").StringsVar(&conf.EnableFeatures)
168
170
169
171
conf.rwConfig=extflag.RegisterPathOrContent(cmd, "remote-write.config", "YAML config for the remote-write configurations, that specify servers where samples should be sent to (see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write). This automatically enables stateless mode for ruler and no series will be stored in the ruler's TSDB. If an empty config (or file) is provided, the flag is ignored and ruler is run with its own TSDB.", extflag.WithEnvSubstitution())
0 commit comments