Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117479,7 +117479,7 @@ components:
`filter.indexes` is not supported and is ignored.
properties:
compute:
description: The list of metrics or timeseries to compute for the retrieved buckets.
description: The list of metrics or timeseries to compute for the retrieved buckets. All rules must have the same `type`; mixing `total` and `timeseries` rules is rejected.
items:
$ref: "#/components/schemas/RUMCompute"
type: array
Expand All @@ -117497,7 +117497,7 @@ components:
type: object
RUMAggregateSort:
description: A sort rule.
example: {"aggregation": "count", "order": "asc"}
example: {"aggregation": "count", "order": "asc", "type": "measure"}
properties:
aggregation:
$ref: "#/components/schemas/RUMAggregationFunction"
Expand All @@ -117512,7 +117512,7 @@ components:
type: object
RUMAggregateSortType:
default: "alphabetical"
description: The type of sorting algorithm. `alphabetical` sorts buckets by the facet value. `measure` sorts them by a computed aggregation.
description: The type of sorting algorithm. `alphabetical` sorts buckets by the facet value. `measure` sorts them by a computed aggregation, and is required when the sort sets `aggregation` or `metric`.
enum: ["alphabetical", "measure"]
type: string
x-enum-varnames: ["ALPHABETICAL", "MEASURE"]
Expand Down Expand Up @@ -247505,6 +247505,7 @@ paths:
sort:
aggregation: count
order: asc
type: measure
options:
timezone: GMT
page:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ public RUMAggregateRequest addComputeItem(RUMCompute computeItem) {
}

/**
* The list of metrics or timeseries to compute for the retrieved buckets.
* The list of metrics or timeseries to compute for the retrieved buckets. All rules must have the
* same <code>type</code>; mixing <code>total</code> and <code>timeseries</code> rules is
* rejected.
*
* @return compute
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public RUMAggregateSort type(RUMAggregateSortType type) {

/**
* The type of sorting algorithm. <code>alphabetical</code> sorts buckets by the facet value.
* <code>measure</code> sorts them by a computed aggregation.
* <code>measure</code> sorts them by a computed aggregation, and is required when the sort sets
* <code>aggregation</code> or <code>metric</code>.
*
* @return type
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

/**
* The type of sorting algorithm. <code>alphabetical</code> sorts buckets by the facet value. <code>
* measure</code> sorts them by a computed aggregation.
* measure</code> sorts them by a computed aggregation, and is required when the sort sets <code>
* aggregation</code> or <code>metric</code>.
*/
@JsonSerialize(using = RUMAggregateSortType.RUMAggregateSortTypeSerializer.class)
public class RUMAggregateSortType extends ModelEnum<String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Feature: RUM
@generated @skip @team:ddoghq/rum-backend
Scenario: Aggregate RUM events returns "Bad Request" response
Given new "AggregateRUMEvents" request
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@view.loading_time", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.name", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
And body with value {"compute": [{"aggregation": "pc90", "interval": "5m", "metric": "@view.loading_time", "type": "total"}], "filter": {"from": "now-15m", "query": "@type:session AND @session.type:user", "to": "now"}, "group_by": [{"facet": "@view.name", "histogram": {"interval": 10, "max": 100, "min": 50}, "limit": 10, "sort": {"aggregation": "count", "order": "asc", "type": "measure"}, "total": false}], "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}}
When the request is sent
Then the response status is 400 Bad Request

Expand Down
Loading