Skip to content

Commit c3c70ec

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix spans/logs custom metrics delete operation responses (#1103)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent b0bc0bc commit c3c70ec

File tree

10 files changed

+62
-64
lines changed

10 files changed

+62
-64
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.4",
7-
"regenerated": "2023-04-17 18:07:39.064189",
8-
"spec_repo_commit": "25a92e6d"
7+
"regenerated": "2023-04-18 17:35:12.113188",
8+
"spec_repo_commit": "0c4beb36"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-04-17 18:07:39.076923",
13-
"spec_repo_commit": "25a92e6d"
12+
"regenerated": "2023-04-18 17:35:12.127152",
13+
"spec_repo_commit": "0c4beb36"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14564,7 +14564,7 @@ paths:
1456414564
parameters:
1456514565
- $ref: '#/components/parameters/SpansMetricIDParameter'
1456614566
responses:
14567-
'200':
14567+
'204':
1456814568
description: OK
1456914569
'403':
1457014570
$ref: '#/components/responses/NotAuthorizedResponse'
@@ -18090,7 +18090,7 @@ paths:
1809018090
parameters:
1809118091
- $ref: '#/components/parameters/MetricID'
1809218092
responses:
18093-
'200':
18093+
'204':
1809418094
description: OK
1809518095
'403':
1809618096
$ref: '#/components/responses/NotAuthorizedResponse'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-05-12T09:52:23.762Z"
1+
"2023-04-18T17:27:11.097Z"

cassettes/v2/Logs-Metrics_3185148095/Delete-a-log-based-metric-returns-OK-response_1536464549/recording.har

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "b9e060180894969b2f3cd8898f7bf343",
11+
"_id": "756a0b409fbb03651b2aa8966134a09f",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,17 +32,17 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"filter\":{\"query\":\"source:Test-Delete_a_log_based_metric_returns_OK_response-1652349143\"}},\"id\":\"Test-Delete_a_log_based_metric_returns_OK_response-1652349143\",\"type\":\"logs_metrics\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"filter\":{\"query\":\"source:Test-Delete_a_log_based_metric_returns_OK_response-1681838831\"}},\"id\":\"Test-Delete_a_log_based_metric_returns_OK_response-1681838831\",\"type\":\"logs_metrics\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/logs/config/metrics"
3939
},
4040
"response": {
41-
"bodySize": 259,
41+
"bodySize": 260,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 259,
45-
"text": "{\"data\":{\"attributes\":{\"filter\":{\"query\":\"source:Test-Delete_a_log_based_metric_returns_OK_response-1652349143\"},\"group_by\":[],\"compute\":{\"aggregation_type\":\"count\"}},\"type\":\"logs_metrics\",\"id\":\"Test_Delete_a_log_based_metric_returns_OK_response_1652349143\"}}"
44+
"size": 260,
45+
"text": "{\"data\":{\"id\":\"Test_Delete_a_log_based_metric_returns_OK_response_1681838831\",\"attributes\":{\"filter\":{\"query\":\"source:Test-Delete_a_log_based_metric_returns_OK_response-1681838831\"},\"group_by\":[],\"compute\":{\"aggregation_type\":\"count\"}},\"type\":\"logs_metrics\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 692,
54+
"headersSize": 676,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2022-05-12T09:52:23.764Z",
61-
"time": 555
60+
"startedDateTime": "2023-04-18T17:27:11.104Z",
61+
"time": 447
6262
},
6363
{
64-
"_id": "64a7bae11f24ed7ca9008e4705725a6b",
64+
"_id": "a668a5d7ac44f86e13101356ffc7ba38",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,33 +78,32 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1652349143"
81+
"url": "https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1681838831"
8282
},
8383
"response": {
84-
"bodySize": 2,
84+
"bodySize": 0,
8585
"content": {
86-
"mimeType": "application/json",
87-
"size": 2,
88-
"text": "{}"
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
8988
},
9089
"cookies": [],
9190
"headers": [
9291
{
9392
"name": "content-type",
94-
"value": "application/json"
93+
"value": "text/html; charset=utf-8"
9594
}
9695
],
97-
"headersSize": 667,
96+
"headersSize": 663,
9897
"httpVersion": "HTTP/1.1",
9998
"redirectURL": "",
100-
"status": 200,
101-
"statusText": "OK"
99+
"status": 204,
100+
"statusText": "No Content"
102101
},
103-
"startedDateTime": "2022-05-12T09:52:24.324Z",
104-
"time": 423
102+
"startedDateTime": "2023-04-18T17:27:11.575Z",
103+
"time": 290
105104
},
106105
{
107-
"_id": "64a7bae11f24ed7ca9008e4705725a6b",
106+
"_id": "a668a5d7ac44f86e13101356ffc7ba38",
108107
"_order": 1,
109108
"cache": {},
110109
"request": {
@@ -121,14 +120,14 @@
121120
"httpVersion": "HTTP/1.1",
122121
"method": "DELETE",
123122
"queryString": [],
124-
"url": "https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1652349143"
123+
"url": "https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1681838831"
125124
},
126125
"response": {
127-
"bodySize": 116,
126+
"bodySize": 117,
128127
"content": {
129128
"mimeType": "application/json",
130-
"size": 116,
131-
"text": "{\"errors\":[\"not_found(Metric with name 'Test_Delete_a_log_based_metric_returns_OK_response_1652349143' not found)\"]}"
129+
"size": 117,
130+
"text": "{\"errors\":[\"not_found(Metric with name 'Test_Delete_a_log_based_metric_returns_OK_response_1681838831' not found)\"]}\n"
132131
},
133132
"cookies": [],
134133
"headers": [
@@ -137,14 +136,14 @@
137136
"value": "application/json"
138137
}
139138
],
140-
"headersSize": 692,
139+
"headersSize": 676,
141140
"httpVersion": "HTTP/1.1",
142141
"redirectURL": "",
143142
"status": 404,
144143
"statusText": "Not Found"
145144
},
146-
"startedDateTime": "2022-05-12T09:52:24.753Z",
147-
"time": 502
145+
"startedDateTime": "2023-04-18T17:27:11.878Z",
146+
"time": 291
148147
}
149148
],
150149
"pages": [],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2023-03-28T14:55:25.279Z"
1+
"2023-04-18T17:28:08.946Z"

cassettes/v2/Spans-Metrics_2509732495/Delete-a-span-based-metric-returns-OK-response_1713567809/recording.har

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "3cbb3815f6e07de4b0ae7bfa2b3acbbe",
11+
"_id": "a0db5bd16c235f55945b7e2ecec0ec45",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -32,7 +32,7 @@
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"filter\":{\"query\":\"source:Test-Delete_a_span_based_metric_returns_OK_response-1680015325\"},\"group_by\":[{\"path\":\"resource_name\",\"tag_name\":\"resource_name\"}]},\"id\":\"Test-Delete_a_span_based_metric_returns_OK_response-1680015325\",\"type\":\"spans_metrics\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"filter\":{\"query\":\"source:Test-Delete_a_span_based_metric_returns_OK_response-1681838888\"},\"group_by\":[{\"path\":\"resource_name\",\"tag_name\":\"resource_name\"}]},\"id\":\"Test-Delete_a_span_based_metric_returns_OK_response-1681838888\",\"type\":\"spans_metrics\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/apm/config/metrics"
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 368,
45-
"text": "{\"data\":{\"id\":\"Test_Delete_a_span_based_metric_returns_OK_response_1680015325\",\"attributes\":{\"filter\":{\"query\":\"source:Test-Delete_a_span_based_metric_returns_OK_response-1680015325\"},\"group_by\":[{\"path\":\"resource_name\",\"tag_name\":\"resource_name\"}],\"compute\":{\"aggregation_type\":\"distribution\",\"path\":\"@duration\",\"include_percentiles\":false}},\"type\":\"spans_metrics\"}}\n"
45+
"text": "{\"data\":{\"id\":\"Test_Delete_a_span_based_metric_returns_OK_response_1681838888\",\"attributes\":{\"filter\":{\"query\":\"source:Test-Delete_a_span_based_metric_returns_OK_response-1681838888\"},\"group_by\":[{\"path\":\"resource_name\",\"tag_name\":\"resource_name\"}],\"compute\":{\"aggregation_type\":\"distribution\",\"path\":\"@duration\",\"include_percentiles\":false}},\"type\":\"spans_metrics\"}}\n"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -51,17 +51,17 @@
5151
"value": "application/json"
5252
}
5353
],
54-
"headersSize": 490,
54+
"headersSize": 517,
5555
"httpVersion": "HTTP/1.1",
5656
"redirectURL": "",
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2023-03-28T14:55:25.285Z",
61-
"time": 700
60+
"startedDateTime": "2023-04-18T17:28:08.954Z",
61+
"time": 532
6262
},
6363
{
64-
"_id": "42dcd81b586890915d89cbab9977880d",
64+
"_id": "688ed938a13004c69b174871ce9ddaa8",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -78,33 +78,32 @@
7878
"httpVersion": "HTTP/1.1",
7979
"method": "DELETE",
8080
"queryString": [],
81-
"url": "https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1680015325"
81+
"url": "https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1681838888"
8282
},
8383
"response": {
84-
"bodySize": 3,
84+
"bodySize": 0,
8585
"content": {
86-
"mimeType": "application/json",
87-
"size": 3,
88-
"text": "{}\n"
86+
"mimeType": "text/html; charset=utf-8",
87+
"size": 0
8988
},
9089
"cookies": [],
9190
"headers": [
9291
{
9392
"name": "content-type",
94-
"value": "application/json"
93+
"value": "text/html; charset=utf-8"
9594
}
9695
],
97-
"headersSize": 465,
96+
"headersSize": 504,
9897
"httpVersion": "HTTP/1.1",
9998
"redirectURL": "",
100-
"status": 200,
101-
"statusText": "OK"
99+
"status": 204,
100+
"statusText": "No Content"
102101
},
103-
"startedDateTime": "2023-03-28T14:55:25.996Z",
104-
"time": 410
102+
"startedDateTime": "2023-04-18T17:28:09.499Z",
103+
"time": 232
105104
},
106105
{
107-
"_id": "42dcd81b586890915d89cbab9977880d",
106+
"_id": "688ed938a13004c69b174871ce9ddaa8",
108107
"_order": 1,
109108
"cache": {},
110109
"request": {
@@ -121,14 +120,14 @@
121120
"httpVersion": "HTTP/1.1",
122121
"method": "DELETE",
123122
"queryString": [],
124-
"url": "https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1680015325"
123+
"url": "https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1681838888"
125124
},
126125
"response": {
127126
"bodySize": 118,
128127
"content": {
129128
"mimeType": "application/json",
130129
"size": 118,
131-
"text": "{\"errors\":[\"not_found(Metric with name 'Test_Delete_a_span_based_metric_returns_OK_response_1680015325' not found)\"]}\n"
130+
"text": "{\"errors\":[\"not_found(Metric with name 'Test_Delete_a_span_based_metric_returns_OK_response_1681838888' not found)\"]}\n"
132131
},
133132
"cookies": [],
134133
"headers": [
@@ -137,14 +136,14 @@
137136
"value": "application/json"
138137
}
139138
],
140-
"headersSize": 490,
139+
"headersSize": 517,
141140
"httpVersion": "HTTP/1.1",
142141
"redirectURL": "",
143142
"status": 404,
144143
"statusText": "Not Found"
145144
},
146-
"startedDateTime": "2023-03-28T14:55:26.416Z",
147-
"time": 426
145+
"startedDateTime": "2023-04-18T17:28:09.741Z",
146+
"time": 195
148147
}
149148
],
150149
"pages": [],

features/v2/logs_metrics.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Feature: Logs Metrics
4747
And new "DeleteLogsMetric" request
4848
And request contains "metric_id" parameter from "logs_metric.data.id"
4949
When the request is sent
50-
Then the response status is 200 OK
50+
Then the response status is 204 OK
5151

5252
@generated @skip @team:DataDog/logs-backend
5353
Scenario: Get a log-based metric returns "Not Found" response

features/v2/spans_metrics.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Feature: Spans Metrics
4646
And new "DeleteSpansMetric" request
4747
And request contains "metric_id" parameter from "spans_metric.data.id"
4848
When the request is sent
49-
Then the response status is 200 OK
49+
Then the response status is 204 OK
5050

5151
@generated @skip @team:DataDog/apm
5252
Scenario: Get a span-based metric returns "Not Found" response

packages/datadog-api-client-v2/apis/LogsMetricsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export class LogsMetricsApiResponseProcessor {
288288
const contentType = ObjectSerializer.normalizeMediaType(
289289
response.headers["content-type"]
290290
);
291-
if (response.httpStatusCode == 200) {
291+
if (response.httpStatusCode == 204) {
292292
return;
293293
}
294294
if (

packages/datadog-api-client-v2/apis/SpansMetricsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export class SpansMetricsApiResponseProcessor {
288288
const contentType = ObjectSerializer.normalizeMediaType(
289289
response.headers["content-type"]
290290
);
291-
if (response.httpStatusCode == 200) {
291+
if (response.httpStatusCode == 204) {
292292
return;
293293
}
294294
if (

0 commit comments

Comments
 (0)