SigNoz/signoz · error
invalid series aggregation: %s
Error message
invalid series aggregation: %s
What it means
Thrown by SecondaryAggregation.Validate (series aggregation) when the value is not sum, avg, min, or max.
Source
Thrown at pkg/query-service/model/v3/v3.go:821
type SecondaryAggregation string
const (
SecondaryAggregationUnspecified SecondaryAggregation = ""
SecondaryAggregationSum SecondaryAggregation = "sum"
SecondaryAggregationAvg SecondaryAggregation = "avg"
SecondaryAggregationMin SecondaryAggregation = "min"
SecondaryAggregationMax SecondaryAggregation = "max"
)
func (s SecondaryAggregation) Validate() error {
switch s {
case SecondaryAggregationSum,
SecondaryAggregationAvg,
SecondaryAggregationMin,
SecondaryAggregationMax:
return nil
default:
return fmt.Errorf("invalid series aggregation: %s", s)
}
}
type FunctionName string
const (
FunctionNameCutOffMin FunctionName = "cutOffMin"
FunctionNameCutOffMax FunctionName = "cutOffMax"
FunctionNameClampMin FunctionName = "clampMin"
FunctionNameClampMax FunctionName = "clampMax"
FunctionNameAbsolute FunctionName = "absolute"
FunctionNameRunningDiff FunctionName = "runningDiff"
FunctionNameLog2 FunctionName = "log2"
FunctionNameLog10 FunctionName = "log10"
FunctionNameCumSum FunctionName = "cumSum"
FunctionNameEWMA3 FunctionName = "ewma3"
FunctionNameEWMA5 FunctionName = "ewma5"
FunctionNameEWMA7 FunctionName = "ewma7"View on GitHub (pinned to 5069bf80b0)
Solutions
- Use one of sum/avg/min/max
- If you need percentiles, use space aggregation instead and omit secondaryAggregation
- Leave it empty when there is no group by on a value panel
Example fix
// before "secondaryAggregation":"p95" // after "secondaryAggregation":"avg"
Defensive patterns
Strategy: type-guard
Validate before calling
if q.SecondaryAggregation != "" { if err := q.SecondaryAggregation.Validate(); err != nil { return err } } Type guard
func isValidSeriesAgg(s v3.SecondaryAggregation) bool { return s.Validate() == nil } Prevention
- Remember only sum/avg/min/max are valid for series aggregation
When it happens
Trigger: Setting secondaryAggregation/series aggregation on a builder query to an unsupported value such as "p95" or "".
Common situations: Value-type panels with group by require SecondaryAggregation; developers set a percentile there assuming it's supported like space aggregation.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- panel type is invalid: %w
- query type is invalid: %w
- invalid time aggregation: %s
- invalid space aggregation: %s
- invalid function name: %s
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/9cbc446b9915f2ac.
Report an issue: GitHub.