Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
2 changes: 1 addition & 1 deletion examples/v2/rum-metrics/CreateRumMetric.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2024-11-28T15:31:19.388Z
2025-05-22T06:41:46.880Z
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand All @@ -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
},
Expand All @@ -48,6 +48,6 @@
"timeToLive": {
"unlimited": true
},
"id": "f43cd3bd-54ea-b636-71dc-c9e06bea290c"
"id": "4afe641a-e95c-2475-bc3a-29853567e435"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down