SigNoz/signoz · error

unsupported aggregate operator

Error message

unsupported aggregate operator

What it means

In buildDeltaMetricQuery (used by PrepareMetricQuery for delta/gauge-style metric queries), the switch over AggregateOperator reached its default branch: the requested aggregator is not implemented for this query shape. The message is generic because any unknown/unimplemented operator lands here, unlike the explicitly rejected ones in table view.

Source

Thrown at pkg/query-service/app/metrics/v3/delta.go:156

		op := "toFloat64(count(distinct(value)))"
		query := fmt.Sprintf(queryTmpl, groupTags, step, op, filterSubQuery, groupBy, orderBy)
		return query, nil
	case v3.AggregateOperatorNoOp:
		queryTmpl :=
			"SELECT fingerprint, labels as fullLabels," +
				" toStartOfInterval(toDateTime(intDiv(unix_milli, 1000)), INTERVAL %d SECOND) as ts," +
				" any(value) as value" +
				" FROM " + constants.SIGNOZ_METRIC_DBNAME + "." + constants.SIGNOZ_SAMPLES_V4_TABLENAME +
				" INNER JOIN" +
				" (%s) as filtered_time_series" +
				" USING fingerprint" +
				" WHERE " + samplesTableTimeFilter +
				" GROUP BY fingerprint, labels, ts" +
				" ORDER BY fingerprint, labels, ts"
		query := fmt.Sprintf(queryTmpl, step, filterSubQuery)
		return query, nil
	default:
		return "", fmt.Errorf("unsupported aggregate operator")
	}
}

View on GitHub (pinned to 5069bf80b0)

Solutions

  1. Use an implemented operator for this query type (sum, avg, min, max, rate variants depending on builder)
  2. Upgrade (or align) frontend and query-service so operator sets match
  3. Log the exact operator value server-side/client-side to identify the mismatch, then fix the request

Example fix

// before
req.AggregateAttribute.AggregateOperator = v3.AggregateOperatorNoOp
// after
req.AggregateAttribute.AggregateOperator = v3.AggregateOperatorAvg
Defensive patterns

Strategy: validation

Validate before calling

if !isKnownAggregateOperator(req.AggregateOperator) {
  return fmt.Errorf("unsupported aggregate operator %q for this query type", req.AggregateOperator)
}

Type guard

func isSupportedDeltaOperator(op string) bool { return isKnownAggregateOperator(op) && op != "noop" }

Try / catch

Catch the error from PreparePipeline/PrepareMetricQuery call chain, inspect the operator, and surface a config error; deterministic — no retry.

Prevention

When it happens

Trigger: A v3 metrics query whose dataSource/panel type routes to the delta builder with an unsupported AggregateOperator (e.g. noop, or a newer operator constant the deployed query-service doesn't handle). PrepareMetricQuery calls buildDeltaMetricQuery and the default branch returns the error.

Common situations: Version skew between SigNoz frontend and query-service after a partial upgrade; hand-crafted API requests with custom operator strings; operators valid for table view but not implemented in the delta path.

Related errors


AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28). Data as JSON: /api/errors/13dd15cd5936a74a. Report an issue: GitHub.