From 15cea39136bbdbcae3016b84bd646a3220bd7580 Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Mon, 16 Sep 2024 17:45:32 +0200 Subject: [PATCH] promql: put holt_winters behind experimental feature flag Signed-off-by: Jan Fajerski --- docs/querying/functions.md | 2 ++ promql/parser/functions.go | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/querying/functions.md b/docs/querying/functions.md index e13628c5c..54d0d05dd 100644 --- a/docs/querying/functions.md +++ b/docs/querying/functions.md @@ -382,6 +382,8 @@ variance of observations in a native histogram. ## `holt_winters()` +**This function has to be enabled via the [feature flag](../feature_flags.md#experimental-promql-functions) `--enable-feature=promql-experimental-functions`.** + `holt_winters(v range-vector, sf scalar, tf scalar)` produces a smoothed value for time series based on the range in `v`. The lower the smoothing factor `sf`, the more importance is given to old data. The higher the trend factor `tf`, the diff --git a/promql/parser/functions.go b/promql/parser/functions.go index 99b41321f..4fe3c8093 100644 --- a/promql/parser/functions.go +++ b/promql/parser/functions.go @@ -203,9 +203,10 @@ var Functions = map[string]*Function{ ReturnType: ValueTypeVector, }, "holt_winters": { - Name: "holt_winters", - ArgTypes: []ValueType{ValueTypeMatrix, ValueTypeScalar, ValueTypeScalar}, - ReturnType: ValueTypeVector, + Name: "holt_winters", + ArgTypes: []ValueType{ValueTypeMatrix, ValueTypeScalar, ValueTypeScalar}, + ReturnType: ValueTypeVector, + Experimental: true, }, "hour": { Name: "hour",