Skip to content

Commit b98f09d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add trace_rate support to APM retention filter APIs (#2143)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 846803a commit b98f09d

File tree

35 files changed

+552
-114
lines changed

35 files changed

+552
-114
lines changed

.apigentools-info

+4-4
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-04-08 14:37:46.757489",
8-
"spec_repo_commit": "642b7d0b"
7+
"regenerated": "2025-04-08 20:00:50.293606",
8+
"spec_repo_commit": "3e2afa30"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-08 14:37:46.774007",
13-
"spec_repo_commit": "642b7d0b"
12+
"regenerated": "2025-04-08 20:00:50.311601",
13+
"spec_repo_commit": "3e2afa30"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+32
Original file line numberDiff line numberDiff line change
@@ -25238,6 +25238,14 @@ components:
2523825238
example: 1.0
2523925239
format: double
2524025240
type: number
25241+
trace_rate:
25242+
description: 'Sample rate to apply to traces containing spans going through
25243+
this retention filter.
25244+
25245+
A value of 1.0 keeps all traces with spans matching the query.'
25246+
example: 1.0
25247+
format: double
25248+
type: number
2524125249
type: object
2524225250
RetentionFilterAllType:
2524325251
default: spans-sampling-processor
@@ -25297,6 +25305,14 @@ components:
2529725305
example: 1.0
2529825306
format: double
2529925307
type: number
25308+
trace_rate:
25309+
description: 'Sample rate to apply to traces containing spans going through
25310+
this retention filter.
25311+
25312+
A value of 1.0 keeps all traces with spans matching the query.'
25313+
example: 1.0
25314+
format: double
25315+
type: number
2530025316
type: object
2530125317
RetentionFilterCreateAttributes:
2530225318
description: The object describing the configuration of the retention filter
@@ -25322,6 +25338,14 @@ components:
2532225338
example: 1.0
2532325339
format: double
2532425340
type: number
25341+
trace_rate:
25342+
description: 'Sample rate to apply to traces containing spans going through
25343+
this retention filter.
25344+
25345+
A value of 1.0 keeps all traces with spans matching the query.'
25346+
example: 1.0
25347+
format: double
25348+
type: number
2532525349
required:
2532625350
- name
2532725351
- filter
@@ -25393,6 +25417,14 @@ components:
2539325417
example: 1.0
2539425418
format: double
2539525419
type: number
25420+
trace_rate:
25421+
description: 'Sample rate to apply to traces containing spans going through
25422+
this retention filter.
25423+
25424+
A value of 1.0 keeps all traces with spans matching the query.'
25425+
example: 1.0
25426+
format: double
25427+
type: number
2539625428
required:
2539725429
- name
2539825430
- filter
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2024-04-10T12:31:19.300Z"
1+
"2025-04-08T11:32:44.101Z"

cassettes/v2/APM-Retention-Filters_3978335078/Create-a-default-retention-filter-returns-Bad-Request-response_652075659/recording.har

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"status": 400,
5858
"statusText": "Bad Request"
5959
},
60-
"startedDateTime": "2024-04-10T12:31:19.304Z",
61-
"time": 436
60+
"startedDateTime": "2025-04-08T11:32:44.106Z",
61+
"time": 504
6262
}
6363
],
6464
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-09-21T16:39:02.926Z"
1+
"2025-04-08T11:32:44.623Z"

cassettes/v2/APM-Retention-Filters_3978335078/Create-a-retention-filter-returns-Bad-Request-response_2372248234/recording.har

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"status": 400,
5858
"statusText": "Bad Request"
5959
},
60-
"startedDateTime": "2023-09-21T16:39:03.207Z",
61-
"time": 101
60+
"startedDateTime": "2025-04-08T11:32:44.627Z",
61+
"time": 462
6262
}
6363
],
6464
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-10-19T12:28:01.048Z"
1+
"2025-04-08T11:32:45.098Z"

cassettes/v2/APM-Retention-Filters_3978335078/Create-a-retention-filter-returns-OK-response_2703924536/recording.har

+9-9
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters"
3939
},
4040
"response": {
41-
"bodySize": 414,
41+
"bodySize": 395,
4242
"content": {
4343
"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"
44+
"size": 395,
45+
"text": "{\"data\":{\"id\":\"x1aRVkAVQN2CBx1ghs4xDQ\",\"attributes\":{\"name\":\"my retention filter\",\"rate\":1.0,\"trace_rate\":0.0,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"editable\":true,\"modified_by\":\"[email protected]\",\"modified_at\":1744111965,\"created_by\":\"[email protected]\",\"created_at\":1744111965},\"type\":\"apm_retention_filter\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-10-19T12:28:01.335Z",
61-
"time": 153
60+
"startedDateTime": "2025-04-08T11:32:45.102Z",
61+
"time": 307
6262
},
6363
{
64-
"_id": "08b88a2ab9800d90f3fc626041e1e05d",
64+
"_id": "8bfe0723db60aef5b1a306ff3861214a",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,7 +78,7 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/kkZkTzFaR_Oy4OWzOJQbcw"
81+
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/x1aRVkAVQN2CBx1ghs4xDQ"
8282
},
8383
"response": {
8484
"bodySize": 3,
@@ -100,8 +100,8 @@
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-10-19T12:28:01.496Z",
104-
"time": 148
103+
"startedDateTime": "2025-04-08T11:32:45.419Z",
104+
"time": 649
105105
}
106106
],
107107
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-04-08T11:32:46.074Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"log": {
3+
"_recordingName": "APM Retention Filters/Create a retention filter with trace rate returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "b840b606a9fbf591c65882fd24902d51",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 226,
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,\"trace_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": 395,
42+
"content": {
43+
"mimeType": "application/json",
44+
"size": 395,
45+
"text": "{\"data\":{\"id\":\"QAtIbDKzQmCnHSvQde-VWw\",\"attributes\":{\"name\":\"my retention filter\",\"rate\":1.0,\"trace_rate\":1.0,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@http.status_code:200 service:my-service\"},\"editable\":true,\"modified_by\":\"[email protected]\",\"modified_at\":1744111966,\"created_by\":\"[email protected]\",\"created_at\":1744111966},\"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": "2025-04-08T11:32:46.079Z",
61+
"time": 505
62+
},
63+
{
64+
"_id": "1ed39428b55919433aab87ada02154fc",
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/QAtIbDKzQmCnHSvQde-VWw"
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": "2025-04-08T11:32:46.592Z",
104+
"time": 696
105+
}
106+
],
107+
"pages": [],
108+
"version": "1.2"
109+
}
110+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-09-06T23:15:15.738Z"
1+
"2025-04-08T11:32:47.294Z"

cassettes/v2/APM-Retention-Filters_3978335078/Delete-a-retention-filter-returns-Not-Found-response_2052691126/recording.har

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"status": 404,
4848
"statusText": "Not Found"
4949
},
50-
"startedDateTime": "2023-09-06T23:15:16.066Z",
51-
"time": 110
50+
"startedDateTime": "2025-04-08T11:32:47.298Z",
51+
"time": 406
5252
}
5353
],
5454
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-09-19T10:11:35.742Z"
1+
"2025-04-08T11:32:47.712Z"

cassettes/v2/APM-Retention-Filters_3978335078/Delete-a-retention-filter-returns-OK-response_3145005417/recording.har

+14-14
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters"
3939
},
4040
"response": {
41-
"bodySize": 371,
41+
"bodySize": 388,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 371,
45-
"text": "{\"data\":{\"id\":\"ErO5dcpeRPmDWbmrryfpYQ\",\"attributes\":{\"name\":\"demo retention filter\",\"rate\":0.9,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@_top_level:1 test:service-demo\"},\"modified_by\":\"[email protected]\",\"modified_at\":1695118296,\"created_by\":\"[email protected]\",\"created_at\":1695118296,\"editable\":true},\"type\":\"apm_retention_filter\"}}\n"
44+
"size": 388,
45+
"text": "{\"data\":{\"id\":\"ZHyaGYKyQNO4nNxGqIxrdg\",\"attributes\":{\"name\":\"demo retention filter\",\"rate\":0.9,\"trace_rate\":0.0,\"enabled\":true,\"filter_type\":\"spans-sampling-processor\",\"filter\":{\"query\":\"@_top_level:1 test:service-demo\"},\"editable\":true,\"modified_by\":\"[email protected]\",\"modified_at\":1744111968,\"created_by\":\"[email protected]\",\"created_at\":1744111968},\"type\":\"apm_retention_filter\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-09-19T10:11:36.028Z",
61-
"time": 140
60+
"startedDateTime": "2025-04-08T11:32:47.716Z",
61+
"time": 603
6262
},
6363
{
64-
"_id": "807306be118d11a729eea8d354b2b55e",
64+
"_id": "f77fa4c64dfb333ad392d715a500c59c",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,7 +78,7 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/ErO5dcpeRPmDWbmrryfpYQ"
81+
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/ZHyaGYKyQNO4nNxGqIxrdg"
8282
},
8383
"response": {
8484
"bodySize": 3,
@@ -100,11 +100,11 @@
100100
"status": 200,
101101
"statusText": "OK"
102102
},
103-
"startedDateTime": "2023-09-19T10:11:36.176Z",
104-
"time": 132
103+
"startedDateTime": "2025-04-08T11:32:48.325Z",
104+
"time": 537
105105
},
106106
{
107-
"_id": "807306be118d11a729eea8d354b2b55e",
107+
"_id": "f77fa4c64dfb333ad392d715a500c59c",
108108
"_order": 1,
109109
"cache": {},
110110
"request": {
@@ -121,14 +121,14 @@
121121
"httpVersion": "HTTP/1.1",
122122
"method": "DELETE",
123123
"queryString": [],
124-
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/ErO5dcpeRPmDWbmrryfpYQ"
124+
"url": "https://api.datadoghq.com/api/v2/apm/config/retention-filters/ZHyaGYKyQNO4nNxGqIxrdg"
125125
},
126126
"response": {
127127
"bodySize": 75,
128128
"content": {
129129
"mimeType": "application/json",
130130
"size": 75,
131-
"text": "{\"errors\":[\"retention filter with id: 'ErO5dcpeRPmDWbmrryfpYQ' not found\"]}"
131+
"text": "{\"errors\":[\"retention filter with id: 'ZHyaGYKyQNO4nNxGqIxrdg' not found\"]}"
132132
},
133133
"cookies": [],
134134
"headers": [
@@ -143,8 +143,8 @@
143143
"status": 404,
144144
"statusText": "Not Found"
145145
},
146-
"startedDateTime": "2023-09-19T10:11:36.316Z",
147-
"time": 79
146+
"startedDateTime": "2025-04-08T11:32:48.871Z",
147+
"time": 501
148148
}
149149
],
150150
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-09-28T08:19:42.753Z"
1+
"2025-04-08T11:32:49.382Z"

cassettes/v2/APM-Retention-Filters_3978335078/Get-a-given-APM-retention-filter-returns-Not-Found-response_1996611078/recording.har

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"status": 404,
4848
"statusText": "Not Found"
4949
},
50-
"startedDateTime": "2023-09-28T08:19:43.110Z",
51-
"time": 373
50+
"startedDateTime": "2025-04-08T11:32:49.387Z",
51+
"time": 396
5252
}
5353
],
5454
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-09-28T08:19:43.496Z"
1+
"2025-04-08T11:32:49.792Z"

0 commit comments

Comments
 (0)