Add feature flag

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
This commit is contained in:
Danny Kopping 2023-10-25 23:05:01 +02:00 committed by Marco Pracucci
parent 940f83a540
commit ed2933ca60
No known key found for this signature in database
GPG key ID: 74C1BD403D2DF9B5
2 changed files with 14 additions and 0 deletions

View file

@ -158,6 +158,7 @@ type flagConfig struct {
enablePerStepStats bool
enableAutoGOMAXPROCS bool
enableAutoGOMEMLIMIT bool
enableConcurrentRuleEval bool
prometheusURL string
corsRegexString string
@ -204,6 +205,9 @@ func (c *flagConfig) setFeatureListOptions(logger log.Logger) error {
case "auto-gomemlimit":
c.enableAutoGOMEMLIMIT = true
level.Info(logger).Log("msg", "Automatically set GOMEMLIMIT to match Linux container or system memory limit")
case "concurrent-rule-eval":
c.enableConcurrentRuleEval = true
level.Info(logger).Log("msg", "Experimental concurrent rule evaluation enabled.")
case "no-default-scrape-port":
c.scrape.NoDefaultPort = true
level.Info(logger).Log("msg", "No default port will be appended to scrape targets' addresses.")

View file

@ -212,3 +212,13 @@ Enables ingestion of created timestamp. Created timestamps are injected as 0 val
Currently Prometheus supports created timestamps only on the traditional Prometheus Protobuf protocol (WIP for other protocols). As a result, when enabling this feature, the Prometheus protobuf scrape protocol will be prioritized (See `scrape_config.scrape_protocols` settings for more details).
Besides enabling this feature in Prometheus, created timestamps need to be exposed by the application being scraped.
## Concurrent evaluation of independent rules
`--enable-feature=concurrent-rule-eval`
Rule groups execute concurrently, but the rules within a group execute sequentially; this is because rules can use the
output of a preceding rule as its input. However, if there is no detectable relationship between rules then there is no
reason to run them sequentially. This can improve rule reliability at the expense of adding more concurrent query
load. The number of concurrent rule evaluations can be configured with `--rules.max-concurrent-rule-evals` which is set
to `4` by default.