Skip to content

Commit 6dee324

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit f1af64a of spec repo
1 parent d9d5c67 commit 6dee324

27 files changed

+1975
-3
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 575 additions & 0 deletions
Large diffs are not rendered by default.

features/v2/metrics.feature

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,60 @@ Feature: Metrics
344344
And the response "data.type" is equal to "scalar_response"
345345
And the response "data.attributes.columns[0].name" is equal to "a"
346346

347+
@skip-validation @team:Datadog/timeseries-query
348+
Scenario: Scalar cross product query with apm_dependency_stats data source returns "OK" response
349+
Given a valid "appKeyAuth" key in the system
350+
And new "QueryScalarData" request
351+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_dependency_stats", "name": "a", "env": "ci", "service": "cassandra", "stat": "avg_duration", "operation_name": "cassandra.query", "resource_name": "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", "primary_tag_name": "datacenter", "primary_tag_value": "edge-eu1.prod.dog"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
352+
When the request is sent
353+
Then the response status is 200 OK
354+
And the response "data.type" is equal to "scalar_response"
355+
356+
@skip-validation @team:Datadog/timeseries-query
357+
Scenario: Scalar cross product query with apm_metrics data source returns "OK" response
358+
Given a valid "appKeyAuth" key in the system
359+
And new "QueryScalarData" request
360+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
361+
When the request is sent
362+
Then the response status is 200 OK
363+
And the response "data.type" is equal to "scalar_response"
364+
365+
@skip-validation @team:Datadog/timeseries-query
366+
Scenario: Scalar cross product query with apm_resource_stats data source returns "OK" response
367+
Given a valid "appKeyAuth" key in the system
368+
And new "QueryScalarData" request
369+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "apm_resource_stats", "name": "a", "env": "staging", "service": "azure-bill-import", "stat": "hits", "operation_name": "cassandra.query", "group_by": ["resource_name"], "primary_tag_name": "datacenter", "primary_tag_value": "*"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
370+
When the request is sent
371+
Then the response status is 200 OK
372+
And the response "data.type" is equal to "scalar_response"
373+
374+
@skip-validation @team:Datadog/timeseries-query
375+
Scenario: Scalar cross product query with container data source returns "OK" response
376+
Given a valid "appKeyAuth" key in the system
377+
And new "QueryScalarData" request
378+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "container", "name": "a", "metric": "container.cpu.usage", "tag_filters": [], "limit": 10, "sort": "desc"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
379+
When the request is sent
380+
Then the response status is 200 OK
381+
And the response "data.type" is equal to "scalar_response"
382+
383+
@skip-validation @team:Datadog/timeseries-query
384+
Scenario: Scalar cross product query with process data source returns "OK" response
385+
Given a valid "appKeyAuth" key in the system
386+
And new "QueryScalarData" request
387+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "process", "name": "a", "metric": "process.stat.cpu.total_pct", "text_filter": "", "tag_filters": [], "limit": 10, "sort": "desc", "is_normalized_cpu": false}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
388+
When the request is sent
389+
Then the response status is 200 OK
390+
And the response "data.type" is equal to "scalar_response"
391+
392+
@skip-validation @team:Datadog/timeseries-query
393+
Scenario: Scalar cross product query with slo data source returns "OK" response
394+
Given a valid "appKeyAuth" key in the system
395+
And new "QueryScalarData" request
396+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "slo", "name": "a", "slo_id": "12345678910", "measure": "slo_status", "slo_query_type": "metric", "group_mode": "overall", "additional_query_filters": "*"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}}
397+
When the request is sent
398+
Then the response status is 200 OK
399+
And the response "data.type" is equal to "scalar_response"
400+
347401
@generated @skip @team:DataDog/metrics-intake
348402
Scenario: Submit metrics returns "Bad Request" response
349403
Given new "SubmitMetrics" request
@@ -415,6 +469,60 @@ Feature: Metrics
415469
Then the response status is 200 OK
416470
And the response "data.type" is equal to "timeseries_response"
417471

472+
@skip-validation @team:Datadog/timeseries-query
473+
Scenario: Timeseries cross product query with apm_dependency_stats data source returns "OK" response
474+
Given a valid "appKeyAuth" key in the system
475+
And new "QueryTimeseriesData" request
476+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_dependency_stats", "name": "a", "env": "ci", "service": "cassandra", "stat": "avg_duration", "operation_name": "cassandra.query", "resource_name": "DELETE FROM monitor_history.monitor_state_change_history WHERE org_id = ? AND monitor_id IN ? AND group = ?", "primary_tag_name": "datacenter", "primary_tag_value": "edge-eu1.prod.dog"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
477+
When the request is sent
478+
Then the response status is 200 OK
479+
And the response "data.type" is equal to "timeseries_response"
480+
481+
@skip-validation @team:Datadog/timeseries-query
482+
Scenario: Timeseries cross product query with apm_metrics data source returns "OK" response
483+
Given a valid "appKeyAuth" key in the system
484+
And new "QueryTimeseriesData" request
485+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_metrics", "name": "a", "stat": "hits", "service": "web-store", "query_filter": "env:prod", "group_by": ["resource_name"]}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
486+
When the request is sent
487+
Then the response status is 200 OK
488+
And the response "data.type" is equal to "timeseries_response"
489+
490+
@skip-validation @team:Datadog/timeseries-query
491+
Scenario: Timeseries cross product query with apm_resource_stats data source returns "OK" response
492+
Given a valid "appKeyAuth" key in the system
493+
And new "QueryTimeseriesData" request
494+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "apm_resource_stats", "name": "a", "env": "staging", "service": "azure-bill-import", "stat": "hits", "operation_name": "cassandra.query", "group_by": ["resource_name"], "primary_tag_name": "datacenter", "primary_tag_value": "*"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
495+
When the request is sent
496+
Then the response status is 200 OK
497+
And the response "data.type" is equal to "timeseries_response"
498+
499+
@skip-validation @team:Datadog/timeseries-query
500+
Scenario: Timeseries cross product query with container data source returns "OK" response
501+
Given a valid "appKeyAuth" key in the system
502+
And new "QueryTimeseriesData" request
503+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "container", "name": "a", "metric": "container.cpu.usage", "tag_filters": [], "limit": 10, "sort": "desc"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
504+
When the request is sent
505+
Then the response status is 200 OK
506+
And the response "data.type" is equal to "timeseries_response"
507+
508+
@skip-validation @team:Datadog/timeseries-query
509+
Scenario: Timeseries cross product query with process data source returns "OK" response
510+
Given a valid "appKeyAuth" key in the system
511+
And new "QueryTimeseriesData" request
512+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "process", "name": "a", "metric": "process.stat.cpu.total_pct", "text_filter": "", "tag_filters": [], "limit": 10, "sort": "desc", "is_normalized_cpu": false}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
513+
When the request is sent
514+
Then the response status is 200 OK
515+
And the response "data.type" is equal to "timeseries_response"
516+
517+
@skip-validation @team:Datadog/timeseries-query
518+
Scenario: Timeseries cross product query with slo data source returns "OK" response
519+
Given a valid "appKeyAuth" key in the system
520+
And new "QueryTimeseriesData" request
521+
And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "slo", "name": "a", "slo_id": "12345678910", "measure": "slo_status", "slo_query_type": "metric", "group_mode": "overall", "additional_query_filters": "*"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}}
522+
When the request is sent
523+
Then the response status is 200 OK
524+
And the response "data.type" is equal to "timeseries_response"
525+
418526
@generated @skip @team:DataDog/metrics-experience
419527
Scenario: Update a tag configuration returns "Bad Request" response
420528
Given a valid "appKeyAuth" key in the system

services/metrics/src/v2/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ export {
1919
} from "./MetricsApi";
2020

2121
export { APIErrorResponse } from "./models/APIErrorResponse";
22+
export { ApmDependencyStatName } from "./models/ApmDependencyStatName";
23+
export { ApmDependencyStatsDataSource } from "./models/ApmDependencyStatsDataSource";
24+
export { ApmDependencyStatsQuery } from "./models/ApmDependencyStatsQuery";
25+
export { ApmMetricsDataSource } from "./models/ApmMetricsDataSource";
26+
export { ApmMetricsQuery } from "./models/ApmMetricsQuery";
27+
export { ApmMetricsStat } from "./models/ApmMetricsStat";
28+
export { ApmResourceStatName } from "./models/ApmResourceStatName";
29+
export { ApmResourceStatsDataSource } from "./models/ApmResourceStatsDataSource";
30+
export { ApmResourceStatsQuery } from "./models/ApmResourceStatsQuery";
31+
export { ContainerDataSource } from "./models/ContainerDataSource";
32+
export { ContainerScalarQuery } from "./models/ContainerScalarQuery";
33+
export { ContainerTimeseriesQuery } from "./models/ContainerTimeseriesQuery";
2234
export { DataScalarColumn } from "./models/DataScalarColumn";
2335
export { EventsAggregation } from "./models/EventsAggregation";
2436
export { EventsCompute } from "./models/EventsCompute";
@@ -126,6 +138,9 @@ export { MetricTagConfigurationUpdateRequest } from "./models/MetricTagConfigura
126138
export { MetricType } from "./models/MetricType";
127139
export { MetricVolumes } from "./models/MetricVolumes";
128140
export { MetricVolumesResponse } from "./models/MetricVolumesResponse";
141+
export { ProcessDataSource } from "./models/ProcessDataSource";
142+
export { ProcessScalarQuery } from "./models/ProcessScalarQuery";
143+
export { ProcessTimeseriesQuery } from "./models/ProcessTimeseriesQuery";
129144
export { QueryFormula } from "./models/QueryFormula";
130145
export { QuerySortOrder } from "./models/QuerySortOrder";
131146
export { ScalarColumn } from "./models/ScalarColumn";
@@ -141,6 +156,11 @@ export { ScalarFormulaResponseType } from "./models/ScalarFormulaResponseType";
141156
export { ScalarMeta } from "./models/ScalarMeta";
142157
export { ScalarQuery } from "./models/ScalarQuery";
143158
export { ScalarResponse } from "./models/ScalarResponse";
159+
export { SloDataSource } from "./models/SloDataSource";
160+
export { SloQuery } from "./models/SloQuery";
161+
export { SlosGroupMode } from "./models/SlosGroupMode";
162+
export { SlosMeasure } from "./models/SlosMeasure";
163+
export { SlosQueryType } from "./models/SlosQueryType";
144164
export { TimeseriesFormulaQueryRequest } from "./models/TimeseriesFormulaQueryRequest";
145165
export { TimeseriesFormulaQueryResponse } from "./models/TimeseriesFormulaQueryResponse";
146166
export { TimeseriesFormulaRequest } from "./models/TimeseriesFormulaRequest";
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* The APM dependency statistic to query.
5+
*/
6+
export type ApmDependencyStatName =
7+
| typeof AVG_DURATION
8+
| typeof AVG_ROOT_DURATION
9+
| typeof AVG_SPANS_PER_TRACE
10+
| typeof ERROR_RATE
11+
| typeof PCT_EXEC_TIME
12+
| typeof PCT_OF_TRACES
13+
| typeof TOTAL_TRACES_COUNT
14+
| UnparsedObject;
15+
export const AVG_DURATION = "avg_duration";
16+
export const AVG_ROOT_DURATION = "avg_root_duration";
17+
export const AVG_SPANS_PER_TRACE = "avg_spans_per_trace";
18+
export const ERROR_RATE = "error_rate";
19+
export const PCT_EXEC_TIME = "pct_exec_time";
20+
export const PCT_OF_TRACES = "pct_of_traces";
21+
export const TOTAL_TRACES_COUNT = "total_traces_count";
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* A data source for APM dependency statistics queries.
5+
*/
6+
export type ApmDependencyStatsDataSource =
7+
| typeof APM_DEPENDENCY_STATS
8+
| UnparsedObject;
9+
export const APM_DEPENDENCY_STATS = "apm_dependency_stats";
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { ApmDependencyStatName } from "./ApmDependencyStatName";
4+
import { ApmDependencyStatsDataSource } from "./ApmDependencyStatsDataSource";
5+
6+
/**
7+
* An individual APM dependency stats query.
8+
*/
9+
export class ApmDependencyStatsQuery {
10+
/**
11+
* A data source for APM dependency statistics queries.
12+
*/
13+
"dataSource": ApmDependencyStatsDataSource;
14+
/**
15+
* The environment to query.
16+
*/
17+
"env": string;
18+
/**
19+
* Determines whether stats for upstream or downstream dependencies should be queried.
20+
*/
21+
"isUpstream"?: boolean;
22+
/**
23+
* The variable name for use in formulas.
24+
*/
25+
"name": string;
26+
/**
27+
* The APM operation name.
28+
*/
29+
"operationName": string;
30+
/**
31+
* The name of the second primary tag used within APM; required when `primary_tag_value` is specified. See https://docs.datadoghq.com/tracing/guide/setting_primary_tags_to_scope/#add-a-second-primary-tag-in-datadog.
32+
*/
33+
"primaryTagName"?: string;
34+
/**
35+
* Filter APM data by the second primary tag. `primary_tag_name` must also be specified.
36+
*/
37+
"primaryTagValue"?: string;
38+
/**
39+
* The resource name to filter by.
40+
*/
41+
"resourceName": string;
42+
/**
43+
* The service name to filter by.
44+
*/
45+
"service": string;
46+
/**
47+
* The APM dependency statistic to query.
48+
*/
49+
"stat": ApmDependencyStatName;
50+
/**
51+
* A container for additional, undeclared properties.
52+
* This is a holder for any undeclared properties as specified with
53+
* the 'additionalProperties' keyword in the OAS document.
54+
*/
55+
"additionalProperties"?: { [key: string]: any };
56+
/**
57+
* @ignore
58+
*/
59+
"_unparsed"?: boolean;
60+
61+
/**
62+
* @ignore
63+
*/
64+
static readonly attributeTypeMap: AttributeTypeMap = {
65+
dataSource: {
66+
baseName: "data_source",
67+
type: "ApmDependencyStatsDataSource",
68+
required: true,
69+
},
70+
env: {
71+
baseName: "env",
72+
type: "string",
73+
required: true,
74+
},
75+
isUpstream: {
76+
baseName: "is_upstream",
77+
type: "boolean",
78+
},
79+
name: {
80+
baseName: "name",
81+
type: "string",
82+
required: true,
83+
},
84+
operationName: {
85+
baseName: "operation_name",
86+
type: "string",
87+
required: true,
88+
},
89+
primaryTagName: {
90+
baseName: "primary_tag_name",
91+
type: "string",
92+
},
93+
primaryTagValue: {
94+
baseName: "primary_tag_value",
95+
type: "string",
96+
},
97+
resourceName: {
98+
baseName: "resource_name",
99+
type: "string",
100+
required: true,
101+
},
102+
service: {
103+
baseName: "service",
104+
type: "string",
105+
required: true,
106+
},
107+
stat: {
108+
baseName: "stat",
109+
type: "ApmDependencyStatName",
110+
required: true,
111+
},
112+
additionalProperties: {
113+
baseName: "additionalProperties",
114+
type: "{ [key: string]: any; }",
115+
},
116+
};
117+
118+
/**
119+
* @ignore
120+
*/
121+
static getAttributeTypeMap(): AttributeTypeMap {
122+
return ApmDependencyStatsQuery.attributeTypeMap;
123+
}
124+
125+
public constructor() {}
126+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* A data source for APM metrics queries.
5+
*/
6+
export type ApmMetricsDataSource = typeof APM_METRICS | UnparsedObject;
7+
export const APM_METRICS = "apm_metrics";

0 commit comments

Comments
 (0)