# MetricAggregation One aggregation declaration inside an anomaly rule. **Type**: `object` ## Properties - name: aggregations (optional) type: array of `AggregationDecl` description: Aggregations to emit. Null = dimension view. - name: filters (optional) type: `FilterPrimitive` - name: groupBy (required) type: array of string description: Group-by tokens: 'object', 'cohort', 'series', or a level-prefixed attribute path. Empty list = global aggregation. - name: source (optional) type: string description: Exact metric name or nested-aggregation alias. Mutually exclusive with filters.metricName. Null for dimension views (when filters is also unset). - name: window (optional) type: string description: Aggregation window. Defaults to timeGranularity.duration.