Skip to content

Commit 51678e7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
[RUM] Use a randomized id for metrics creation scenarios. (#2265)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 09e5997 commit 51678e7

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-05-23 12:48:23.752850",
8-
"spec_repo_commit": "11a9dcb4"
7+
"regenerated": "2025-05-23 14:41:15.166535",
8+
"spec_repo_commit": "a4ecd4cf"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-05-23 12:48:23.769415",
13-
"spec_repo_commit": "11a9dcb4"
12+
"regenerated": "2025-05-23 14:41:15.182511",
13+
"spec_repo_commit": "a4ecd4cf"
1414
}
1515
}
1616
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-11-28T15:31:19.388Z"
1+
"2025-05-22T06:41:46.880Z"

cassettes/v2/Rum-Metrics_1429235046/Create-a-rum-based-metric-returns-Created-response_2855752018/recording.har

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "a60dcd3f6b4261be976b55b839c23015",
11+
"_id": "5e0d2db15a24b26de971a05af71e7ec8",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 324,
15+
"bodySize": 357,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"rum.sessions.webui.count\",\"type\":\"rum_metrics\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1747896106\",\"type\":\"rum_metrics\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/rum/config/metrics"
3939
},
4040
"response": {
41-
"bodySize": 324,
41+
"bodySize": 357,
4242
"content": {
4343
"mimeType": "application/vnd.api+json",
44-
"size": 324,
45-
"text": "{\"data\":{\"id\":\"rum.sessions.webui.count\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}"
44+
"size": 357,
45+
"text": "{\"data\":{\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1747896106\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 201,
5858
"statusText": "Created"
5959
},
60-
"startedDateTime": "2024-11-28T15:31:19.392Z",
61-
"time": 428
60+
"startedDateTime": "2025-05-22T06:41:46.882Z",
61+
"time": 691
6262
},
6363
{
64-
"_id": "f43cd3bd54eab63671dcc9e06bea290c",
64+
"_id": "4afe641ae95c2475bc3a29853567e435",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -74,11 +74,11 @@
7474
"value": "*/*"
7575
}
7676
],
77-
"headersSize": 529,
77+
"headersSize": 562,
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/rum/config/metrics/rum.sessions.webui.count"
81+
"url": "https://api.datadoghq.com/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnscreatedresponse1747896106"
8282
},
8383
"response": {
8484
"bodySize": 0,
@@ -94,8 +94,8 @@
9494
"status": 204,
9595
"statusText": "No Content"
9696
},
97-
"startedDateTime": "2024-11-28T15:31:19.829Z",
98-
"time": 317
97+
"startedDateTime": "2025-05-22T06:41:47.579Z",
98+
"time": 308
9999
}
100100
],
101101
"pages": [],

examples/v2/rum-metrics/CreateRumMetric.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const params: v2.RumMetricsApiCreateRumMetricRequest = {
3030
when: "match",
3131
},
3232
},
33-
id: "rum.sessions.webui.count",
33+
id: "examplerummetric",
3434
type: "rum_metrics",
3535
},
3636
},

features/v2/rum_metrics.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ Feature: Rum Metrics
2727
@team:DataDog/rum-backend
2828
Scenario: Create a rum-based metric returns "Created" response
2929
Given new "CreateRumMetric" request
30-
And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "event_type": "session", "filter": {"query": "@service:web-ui"}, "group_by": [{"path": "@browser.name", "tag_name": "browser_name"}], "uniqueness": {"when": "match"}}, "id": "rum.sessions.webui.count", "type": "rum_metrics"}}
30+
And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "event_type": "session", "filter": {"query": "@service:web-ui"}, "group_by": [{"path": "@browser.name", "tag_name": "browser_name"}], "uniqueness": {"when": "match"}}, "id": "{{ unique_lower_alnum }}", "type": "rum_metrics"}}
3131
When the request is sent
3232
Then the response status is 201 Created
33-
And the response "data.id" is equal to "rum.sessions.webui.count"
33+
And the response "data.id" is equal to "{{ unique_lower_alnum }}"
3434
And the response "data.type" is equal to "rum_metrics"
3535
And the response "data.attributes.event_type" is equal to "session"
3636
And the response "data.attributes.compute.aggregation_type" is equal to "distribution"

0 commit comments

Comments
 (0)