Skip to content

Commit b98f09d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
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

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-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

Lines changed: 32 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 9 additions & 9 deletions
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+
}

0 commit comments

Comments
 (0)