Alerting: Enable group-level rule evaluation jittering by default, remove feature toggle (#82212)

* remove jitter feature flag

* Add an out so users can manually disable jitter

* Pass in cfg

* Add TODO to remove knob in future
This commit is contained in:
Alexander Weaver
2024-02-09 15:53:58 -06:00
committed by GitHub
parent b5d14d03d7
commit 5bbe9c6e61
10 changed files with 20 additions and 25 deletions
+5
View File
@@ -83,6 +83,7 @@ type UnifiedAlertingSettings struct {
MaxAttempts int64
MinInterval time.Duration
EvaluationTimeout time.Duration
DisableJitter bool
ExecuteAlerts bool
DefaultConfiguration string
Enabled *bool // determines whether unified alerting is enabled. If it is nil then user did not define it and therefore its value will be determined during migration. Services should not use it directly.
@@ -300,6 +301,10 @@ func (cfg *Cfg) ReadUnifiedAlertingSettings(iniFile *ini.File) error {
uaCfg.BaseInterval = SchedulerBaseInterval
// TODO: This was promoted from a feature toggle and is now the default behavior.
// We can consider removing the knob entirely in a release after 10.4.
uaCfg.DisableJitter = ua.Key("disable_jitter").MustBool(false)
// The base interval of the scheduler for evaluating alerts.
// 1. It is used by the internal scheduler's timer to tick at this interval.
// 2. to spread evaluations of rules that need to be evaluated at the current tick T. In other words, the evaluation of rules at the tick T will be evenly spread in the interval from T to T+scheduler_tick_interval.