Skip to content

Commit 1286798

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8b6d3567 of spec repo (#759)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 79183cb commit 1286798

File tree

8 files changed

+34
-20
lines changed

8 files changed

+34
-20
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.2",
7-
"regenerated": "2022-07-22 18:54:40.662543",
8-
"spec_repo_commit": "692b2bd1"
7+
"regenerated": "2022-07-26 12:50:50.486912",
8+
"spec_repo_commit": "8b6d3567"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-07-22 18:54:40.696212",
13-
"spec_repo_commit": "692b2bd1"
12+
"regenerated": "2022-07-26 12:50:50.499683",
13+
"spec_repo_commit": "8b6d3567"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4251,6 +4251,9 @@ components:
42514251
points:
42524252
- timestamp: 1475317847
42534253
value: 0.7
4254+
resources:
4255+
- name: dummyhost
4256+
type: host
42544257
items:
42554258
$ref: '#/components/schemas/MetricSeries'
42564259
type: array
@@ -4278,12 +4281,15 @@ components:
42784281
type: object
42794282
MetricResource:
42804283
description: Metric resource.
4284+
example:
4285+
name: dummyhost
4286+
type: host
42814287
properties:
42824288
name:
4283-
description: The name of the metric.
4289+
description: The name of the resource.
42844290
type: string
42854291
type:
4286-
description: The type of metric.
4292+
description: The type of the resource.
42874293
type: string
42884294
type: object
42894295
MetricSeries:
@@ -12545,7 +12551,7 @@ paths:
1254512551
metrics directly to the Datadog API without using DogStatsD, expect:\n\n-
1254612552
64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric
1254712553
names\n- 50 bytes for the timeseries\n- The full payload is approximately
12548-
100 bytes."
12554+
100 bytes.\n\nHost name is one of the resources in the Resources field."
1254912555
operationId: SubmitMetrics
1255012556
parameters:
1255112557
- description: HTTP header used to compress the media-type.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2022-05-18T18:24:32.611Z"
1+
"2022-07-12T21:45:36.018Z"

cassettes/v2/Metrics_2046978582/Submit-metrics-returns-Payload-accepted-response_3507880359/recording.har

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "c969dbe43c236eee09185fc9321d83ec",
11+
"_id": "b85f9909a76a06e5fa3f6a9601244087",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 96,
15+
"bodySize": 145,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 491,
29+
"headersSize": 492,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"series\":[{\"metric\":\"system.load.1\",\"points\":[{\"timestamp\":1652898272,\"value\":0.7}],\"type\":0}]}"
35+
"text": "{\"series\":[{\"metric\":\"system.load.1\",\"points\":[{\"timestamp\":1657662336,\"value\":0.7}],\"resources\":[{\"name\":\"dummyhost\",\"type\":\"host\"}],\"type\":0}]}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/series"
@@ -57,8 +57,8 @@
5757
"status": 202,
5858
"statusText": "Accepted"
5959
},
60-
"startedDateTime": "2022-05-18T18:24:32.627Z",
61-
"time": 117
60+
"startedDateTime": "2022-07-12T21:45:36.040Z",
61+
"time": 153
6262
}
6363
],
6464
"pages": [],

examples/v2/metrics/SubmitMetrics.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ const params: v2.MetricsApiSubmitMetricsRequest = {
1919
value: 0.7,
2020
},
2121
],
22+
resources: [
23+
{
24+
name: "dummyhost",
25+
type: "host",
26+
},
27+
],
2228
},
2329
],
2430
},

features/v2/metrics.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,28 +191,28 @@ Feature: Metrics
191191
@generated @skip @team:DataDog/metrics-intake @team:DataDog/metrics-query
192192
Scenario: Submit metrics returns "Bad Request" response
193193
Given new "SubmitMetrics" request
194-
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}]}]}
194+
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}], "resources": [{"name": "dummyhost", "type": "host"}]}]}
195195
When the request is sent
196196
Then the response status is 400 Bad Request
197197

198198
@team:DataDog/metrics-intake @team:DataDog/metrics-query
199199
Scenario: Submit metrics returns "Payload accepted" response
200200
Given new "SubmitMetrics" request
201-
And body with value {"series": [{"metric": "system.load.1", "type": 0, "points": [{"timestamp": {{ timestamp('now') }}, "value": 0.7}]}]}
201+
And body with value {"series": [{"metric": "system.load.1", "type": 0, "points": [{"timestamp": {{ timestamp('now') }}, "value": 0.7}], "resources": [{"name": "dummyhost", "type": "host"}]}]}
202202
When the request is sent
203203
Then the response status is 202 Payload accepted
204204

205205
@generated @skip @team:DataDog/metrics-intake @team:DataDog/metrics-query
206206
Scenario: Submit metrics returns "Payload too large" response
207207
Given new "SubmitMetrics" request
208-
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}]}]}
208+
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}], "resources": [{"name": "dummyhost", "type": "host"}]}]}
209209
When the request is sent
210210
Then the response status is 413 Payload too large
211211

212212
@generated @skip @team:DataDog/metrics-intake @team:DataDog/metrics-query
213213
Scenario: Submit metrics returns "Request timeout" response
214214
Given new "SubmitMetrics" request
215-
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}]}]}
215+
And body with value {"series": [{"metric": "system.load.1", "points": [{"timestamp": 1475317847, "value": 0.7}], "resources": [{"name": "dummyhost", "type": "host"}]}]}
216216
When the request is sent
217217
Then the response status is 408 Request timeout
218218

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,6 +1755,8 @@ export class MetricsApi {
17551755
* - 20 bytes for the metric names
17561756
* - 50 bytes for the timeseries
17571757
* - The full payload is approximately 100 bytes.
1758+
*
1759+
* Host name is one of the resources in the Resources field.
17581760
* @param param The request object
17591761
*/
17601762
public submitMetrics(

packages/datadog-api-client-v2/models/MetricResource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1111
*/
1212
export class MetricResource {
1313
/**
14-
* The name of the metric.
14+
* The name of the resource.
1515
*/
1616
"name"?: string;
1717
/**
18-
* The type of metric.
18+
* The type of the resource.
1919
*/
2020
"type"?: string;
2121

0 commit comments

Comments
 (0)