Skip to content

Commit 29646b1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add test for APM create retention filter (#1382)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent fe5ab53 commit 29646b1

File tree

4 files changed

+117
-5
lines changed

4 files changed

+117
-5
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": "2023-10-18 20:16:44.113785",
8-
"spec_repo_commit": "a1e5664c"
7+
"regenerated": "2023-10-19 13:23:59.746797",
8+
"spec_repo_commit": "823e1cf6"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2023-10-18 20:16:44.132808",
13-
"spec_repo_commit": "a1e5664c"
12+
"regenerated": "2023-10-19 13:23:59.762506",
13+
"spec_repo_commit": "823e1cf6"
1414
}
1515
}
1616
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2023-10-19T12:28:01.048Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "APM Retention Filters/Create a retention filter returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "7a697c95a508933d64da7d94bc8da12e",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 211,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 587,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":true,\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"filter_type\":\"spans-sampling-processor\",\"name\":\"my retention filter\",\"rate\":1},\"type\":\"apm_retention_filter\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters"
39+
},
40+
"response": {
41+
"bodySize": 414,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 414,
45+
"text": "{\"data\":{\"id\":\"kkZkTzFaR_Oy4OWzOJQbcw\",\"attributes\":{\"name\":\"my retention filter\",\"rate\":1.0,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"editable\":true,\"modified_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"modified_at\":1697718481,\"created_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"created_at\":1697718481},\"type\":\"apm_retention_filter\"}}\n"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/json"
52+
}
53+
],
54+
"headersSize": 517,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2023-10-19T12:28:01.335Z",
61+
"time": 153
62+
},
63+
{
64+
"_id": "08b88a2ab9800d90f3fc626041e1e05d",
65+
"_order": 0,
66+
"cache": {},
67+
"request": {
68+
"bodySize": 0,
69+
"cookies": [],
70+
"headers": [
71+
{
72+
"_fromType": "array",
73+
"name": "accept",
74+
"value": "*/*"
75+
}
76+
],
77+
"headersSize": 546,
78+
"httpVersion": "HTTP/1.1",
79+
"method": "DELETE",
80+
"queryString": [],
81+
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/kkZkTzFaR_Oy4OWzOJQbcw"
82+
},
83+
"response": {
84+
"bodySize": 3,
85+
"content": {
86+
"mimeType": "application/json",
87+
"size": 3,
88+
"text": "{}\n"
89+
},
90+
"cookies": [],
91+
"headers": [
92+
{
93+
"name": "content-type",
94+
"value": "application/json"
95+
}
96+
],
97+
"headersSize": 492,
98+
"httpVersion": "HTTP/1.1",
99+
"redirectURL": "",
100+
"status": 200,
101+
"statusText": "OK"
102+
},
103+
"startedDateTime": "2023-10-19T12:28:01.496Z",
104+
"time": 148
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}

features/v2/apm_retention_filters.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Feature: APM Retention Filters
2424
When the request is sent
2525
Then the response status is 409 Conflict
2626

27-
@generated @skip @team:DataDog/apm-trace-intake
27+
@team:DataDog/apm-trace-intake
2828
Scenario: Create a retention filter returns "OK" response
2929
Given new "CreateApmRetentionFilter" request
3030
And body with value {"data": {"attributes": {"enabled": true, "filter": {"query": "@http.status_code:200 service:my-service"}, "filter_type": "spans-sampling-processor", "name": "my retention filter", "rate": 1.0}, "type": "apm_retention_filter"}}
3131
When the request is sent
3232
Then the response status is 200 OK
33+
And the response "data.attributes.name" is equal to "my retention filter"
3334

3435
@team:DataDog/apm-trace-intake
3536
Scenario: Delete a retention filter returns "Not Found" response

0 commit comments

Comments
 (0)