Skip to content

Commit 554ffe5

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

8 files changed

+33
-31
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.537251",
8-
"spec_repo_commit": "25a92e6d"
7+
"regenerated": "2023-04-18 17:35:07.161509",
8+
"spec_repo_commit": "0c4beb36"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-04-17 18:07:39.548748",
13-
"spec_repo_commit": "25a92e6d"
12+
"regenerated": "2023-04-18 17:35:07.174065",
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

tests/v2/cassettes/test_scenarios/test_delete_a_logbased_metric_returns_ok_response.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"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"}}'
3+
body: '{"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"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,9 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/logs/config/metrics
1111
response:
1212
body:
13-
string: '{"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"}}'
13+
string: '{"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"}}
14+
15+
'
1416
headers:
1517
content-type:
1618
- application/json
@@ -23,27 +25,29 @@ interactions:
2325
accept:
2426
- '*/*'
2527
method: DELETE
26-
uri: https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1652349143
28+
uri: https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1681838831
2729
response:
2830
body:
29-
string: '{}'
31+
string: ''
3032
headers:
3133
content-type:
32-
- application/json
34+
- text/html; charset=utf-8
3335
status:
34-
code: 200
35-
message: OK
36+
code: 204
37+
message: No Content
3638
- request:
3739
body: null
3840
headers:
3941
accept:
4042
- '*/*'
4143
method: DELETE
42-
uri: https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1652349143
44+
uri: https://api.datadoghq.com/api/v2/logs/config/metrics/Test_Delete_a_log_based_metric_returns_OK_response_1681838831
4345
response:
4446
body:
45-
string: '{"errors":["not_found(Metric with name ''Test_Delete_a_log_based_metric_returns_OK_response_1652349143''
46-
not found)"]}'
47+
string: '{"errors":["not_found(Metric with name ''Test_Delete_a_log_based_metric_returns_OK_response_1681838831''
48+
not found)"]}
49+
50+
'
4751
headers:
4852
content-type:
4953
- application/json
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

tests/v2/cassettes/test_scenarios/test_delete_a_spanbased_metric_returns_ok_response.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"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"}}'
3+
body: '{"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"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/apm/config/metrics
1111
response:
1212
body:
13-
string: '{"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"}}
13+
string: '{"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"}}
1414
1515
'
1616
headers:
@@ -25,28 +25,26 @@ interactions:
2525
accept:
2626
- '*/*'
2727
method: DELETE
28-
uri: https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1680015325
28+
uri: https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1681838888
2929
response:
3030
body:
31-
string: '{}
32-
33-
'
31+
string: ''
3432
headers:
3533
content-type:
36-
- application/json
34+
- text/html; charset=utf-8
3735
status:
38-
code: 200
39-
message: OK
36+
code: 204
37+
message: No Content
4038
- request:
4139
body: null
4240
headers:
4341
accept:
4442
- '*/*'
4543
method: DELETE
46-
uri: https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1680015325
44+
uri: https://api.datadoghq.com/api/v2/apm/config/metrics/Test_Delete_a_span_based_metric_returns_OK_response_1681838888
4745
response:
4846
body:
49-
string: '{"errors":["not_found(Metric with name ''Test_Delete_a_span_based_metric_returns_OK_response_1680015325''
47+
string: '{"errors":["not_found(Metric with name ''Test_Delete_a_span_based_metric_returns_OK_response_1681838888''
5048
not found)"]}
5149
5250
'

tests/v2/features/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

tests/v2/features/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

0 commit comments

Comments
 (0)