diff --git a/.apigentools-info b/.apigentools-info index 8da1cbbbb8c..7ef85fd1f30 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-23 12:48:19.641798", - "spec_repo_commit": "11a9dcb4" + "regenerated": "2025-05-23 14:41:13.594077", + "spec_repo_commit": "a4ecd4cf" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-23 12:48:19.657459", - "spec_repo_commit": "11a9dcb4" + "regenerated": "2025-05-23 14:41:13.611442", + "spec_repo_commit": "a4ecd4cf" } } } \ No newline at end of file diff --git a/examples/v2/rum-metrics/CreateRumMetric.java b/examples/v2/rum-metrics/CreateRumMetric.java index 76de54274f7..3a282e7b826 100644 --- a/examples/v2/rum-metrics/CreateRumMetric.java +++ b/examples/v2/rum-metrics/CreateRumMetric.java @@ -42,7 +42,7 @@ public static void main(String[] args) { .tagName("browser_name"))) .uniqueness( new RumMetricUniqueness().when(RumMetricUniquenessWhen.WHEN_MATCH))) - .id("rum.sessions.webui.count") + .id("examplerummetric") .type(RumMetricType.RUM_METRICS)); try { diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze index ddbf7666e8d..7304d8219a6 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze @@ -1 +1 @@ -2024-11-28T15:31:19.388Z \ No newline at end of file +2025-05-22T06:41:46.880Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json index 91c7c3b0023..9ae8bb032f0 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"}}" + "json": "{\"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\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"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\"}}}}", + "body": "{\"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\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "a60dcd3f-6b42-61be-976b-55b839c23015" + "id": "5e0d2db1-5a24-b26d-e971-a05af71e7ec8" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/rum.sessions.webui.count", + "path": "/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnscreatedresponse1747896106", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "f43cd3bd-54ea-b636-71dc-c9e06bea290c" + "id": "4afe641a-e95c-2475-bc3a-29853567e435" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature index cf13d41e951..59cff8c7c98 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature @@ -27,10 +27,10 @@ Feature: Rum Metrics @team:DataDog/rum-backend Scenario: Create a rum-based metric returns "Created" response Given new "CreateRumMetric" request - 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"}} + 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"}} When the request is sent Then the response status is 201 Created - And the response "data.id" is equal to "rum.sessions.webui.count" + And the response "data.id" is equal to "{{ unique_lower_alnum }}" And the response "data.type" is equal to "rum_metrics" And the response "data.attributes.event_type" is equal to "session" And the response "data.attributes.compute.aggregation_type" is equal to "distribution"