SigNoz/signoz · error
alpha param missing in query
Error message
alpha param missing in query
What it means
The EWMA smoothing functions (EWMA3/EWMA5/EWMA7) require an alpha argument. Validate() returns this when the function has an empty Args slice.
Source
Thrown at pkg/query-service/model/v3/v3.go:1131
}
if function.Name == FunctionNameTimeShift {
if len(function.Args) == 0 {
return fmt.Errorf("timeShiftBy param missing in query")
}
_, ok := function.Args[0].(float64)
if !ok {
// if string, attempt to convert to float
timeShiftBy, err := strconv.ParseFloat(function.Args[0].(string), 64)
if err != nil {
return fmt.Errorf("timeShiftBy param should be a number")
}
function.Args[0] = timeShiftBy
}
} else if function.Name == FunctionNameEWMA3 ||
function.Name == FunctionNameEWMA5 ||
function.Name == FunctionNameEWMA7 {
if len(function.Args) == 0 {
return fmt.Errorf("alpha param missing in query")
}
alpha, ok := function.Args[0].(float64)
if !ok {
// if string, attempt to convert to float
alpha, err := strconv.ParseFloat(function.Args[0].(string), 64)
if err != nil {
return fmt.Errorf("alpha param should be a float")
}
function.Args[0] = alpha
}
if alpha < 0 || alpha > 1 {
return fmt.Errorf("alpha param should be between 0 and 1")
}
} else if function.Name == FunctionNameCutOffMax ||
function.Name == FunctionNameCutOffMin ||
function.Name == FunctionNameClampMax ||
function.Name == FunctionNameClampMin {
if len(function.Args) == 0 {View on GitHub (pinned to 5069bf80b0)
Solutions
- Add an alpha value between 0 and 1, e.g. "args":[0.5]
- Ensure the client always sends the alpha field for EWMA functions
Example fix
// before
{"name":"EWMA3"}
// after
{"name":"EWMA3","args":[0.5]} Defensive patterns
Strategy: validation
Validate before calling
for _, f := range qb.Functions {
if strings.HasPrefix(string(f.Name), "EWMA") && len(f.Args) == 0 { return errors.New("EWMA requires alpha") }
} Type guard
func ewmaHasAlpha(f v3.Function) bool { return !strings.HasPrefix(string(f.Name), "EWMA") || len(f.Args) > 0 } Prevention
- Default alpha in the UI (e.g. 0.5) so it's never omitted
When it happens
Trigger: "functions":[{"name":"EWMA3"}] with no args, or an args array that is present but empty.
Common situations: UI or API payload construction that omits the smoothing factor; templates with a conditional alpha that evaluates to nothing.
Related errors
- error building clickhouse query: %v
- invalid expression %s: %v
- live tail is only supported for single query
- invalid data type for resource attribute: %s
- unsupported operation, exists and not exists can only be app
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/3430307e615a7e14.
Report an issue: GitHub.