Skip to content

Commit 71984dc

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update v2 metrics list endpoint filter by metric type to use metric type category (#1833)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 03a6cdf commit 71984dc

10 files changed

+50
-16
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": "2024-09-26 19:34:42.677306",
8-
"spec_repo_commit": "83debf9e"
7+
"regenerated": "2024-09-30 13:57:00.510111",
8+
"spec_repo_commit": "eb66b1cf"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-26 19:34:42.692826",
13-
"spec_repo_commit": "83debf9e"
12+
"regenerated": "2024-09-30 13:57:00.525119",
13+
"spec_repo_commit": "eb66b1cf"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13939,8 +13939,8 @@ components:
1393913939
- time: sum, space: sum
1394013940

1394113941

13942-
Can only be applied to metrics that have a `metric_type` of `count`, `rate`,
13943-
or `gauge`.'
13942+
Can only be applied to non_distribution metrics that have a `metric_type`
13943+
of `count`, `rate`, or `gauge`.'
1394413944
example:
1394513945
- space: sum
1394613946
time: sum
@@ -14548,6 +14548,17 @@ components:
1454814548
required:
1454914549
- data
1455014550
type: object
14551+
MetricTagConfigurationMetricTypeCategory:
14552+
default: distribution
14553+
description: The metric's type category.
14554+
enum:
14555+
- non_distribution
14556+
- distribution
14557+
example: distribution
14558+
type: string
14559+
x-enum-varnames:
14560+
- NON_DISTRIBUTION
14561+
- DISTRIBUTION
1455114562
MetricTagConfigurationMetricTypes:
1455214563
default: gauge
1455314564
description: The metric's type.
@@ -32405,7 +32416,7 @@ paths:
3240532416
name: filter[metric_type]
3240632417
required: false
3240732418
schema:
32408-
$ref: '#/components/schemas/MetricTagConfigurationMetricTypes'
32419+
$ref: '#/components/schemas/MetricTagConfigurationMetricTypeCategory'
3240932420
- description: 'Filter distributions with additional percentile
3241032421

3241132422
aggregations enabled or disabled.'

features/support/scenarios_model_mapping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4207,7 +4207,7 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
42074207
"format": "",
42084208
},
42094209
"filterMetricType": {
4210-
"type": "MetricTagConfigurationMetricTypes",
4210+
"type": "MetricTagConfigurationMetricTypeCategory",
42114211
"format": "",
42124212
},
42134213
"filterIncludePercentiles": {

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { MetricPayload } from "../models/MetricPayload";
2929
import { MetricsAndMetricTagConfigurationsResponse } from "../models/MetricsAndMetricTagConfigurationsResponse";
3030
import { MetricSuggestedTagsAndAggregationsResponse } from "../models/MetricSuggestedTagsAndAggregationsResponse";
3131
import { MetricTagConfigurationCreateRequest } from "../models/MetricTagConfigurationCreateRequest";
32-
import { MetricTagConfigurationMetricTypes } from "../models/MetricTagConfigurationMetricTypes";
32+
import { MetricTagConfigurationMetricTypeCategory } from "../models/MetricTagConfigurationMetricTypeCategory";
3333
import { MetricTagConfigurationResponse } from "../models/MetricTagConfigurationResponse";
3434
import { MetricTagConfigurationUpdateRequest } from "../models/MetricTagConfigurationUpdateRequest";
3535
import { MetricVolumesResponse } from "../models/MetricVolumesResponse";
@@ -392,7 +392,7 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
392392
public async listTagConfigurations(
393393
filterConfigured?: boolean,
394394
filterTagsConfigured?: string,
395-
filterMetricType?: MetricTagConfigurationMetricTypes,
395+
filterMetricType?: MetricTagConfigurationMetricTypeCategory,
396396
filterIncludePercentiles?: boolean,
397397
filterQueried?: boolean,
398398
filterTags?: string,
@@ -429,7 +429,7 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
429429
"filter[metric_type]",
430430
ObjectSerializer.serialize(
431431
filterMetricType,
432-
"MetricTagConfigurationMetricTypes",
432+
"MetricTagConfigurationMetricTypeCategory",
433433
""
434434
)
435435
);
@@ -1787,9 +1787,9 @@ export interface MetricsApiListTagConfigurationsRequest {
17871787
filterTagsConfigured?: string;
17881788
/**
17891789
* Filter metrics by metric type.
1790-
* @type MetricTagConfigurationMetricTypes
1790+
* @type MetricTagConfigurationMetricTypeCategory
17911791
*/
1792-
filterMetricType?: MetricTagConfigurationMetricTypes;
1792+
filterMetricType?: MetricTagConfigurationMetricTypeCategory;
17931793
/**
17941794
* Filter distributions with additional percentile
17951795
* aggregations enabled or disabled.

packages/datadog-api-client-v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,7 @@ export { MetricTagConfigurationAttributes } from "./models/MetricTagConfiguratio
14201420
export { MetricTagConfigurationCreateAttributes } from "./models/MetricTagConfigurationCreateAttributes";
14211421
export { MetricTagConfigurationCreateData } from "./models/MetricTagConfigurationCreateData";
14221422
export { MetricTagConfigurationCreateRequest } from "./models/MetricTagConfigurationCreateRequest";
1423+
export { MetricTagConfigurationMetricTypeCategory } from "./models/MetricTagConfigurationMetricTypeCategory";
14231424
export { MetricTagConfigurationMetricTypes } from "./models/MetricTagConfigurationMetricTypes";
14241425
export { MetricTagConfigurationResponse } from "./models/MetricTagConfigurationResponse";
14251426
export { MetricTagConfigurationType } from "./models/MetricTagConfigurationType";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class MetricTagConfigurationAttributes {
2828
* - time: sum, space: avg
2929
* - time: sum, space: sum
3030
*
31-
* Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
31+
* Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
3232
*/
3333
"aggregations"?: Array<MetricCustomAggregation>;
3434
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class MetricTagConfigurationCreateAttributes {
2828
* - time: sum, space: avg
2929
* - time: sum, space: sum
3030
*
31-
* Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
31+
* Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
3232
*/
3333
"aggregations"?: Array<MetricCustomAggregation>;
3434
/**
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
7+
import { UnparsedObject } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* The metric's type category.
11+
*/
12+
13+
export type MetricTagConfigurationMetricTypeCategory =
14+
| typeof NON_DISTRIBUTION
15+
| typeof DISTRIBUTION
16+
| UnparsedObject;
17+
export const NON_DISTRIBUTION = "non_distribution";
18+
export const DISTRIBUTION = "distribution";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class MetricTagConfigurationUpdateAttributes {
2727
* - time: sum, space: avg
2828
* - time: sum, space: sum
2929
*
30-
* Can only be applied to metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
30+
* Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`.
3131
*/
3232
"aggregations"?: Array<MetricCustomAggregation>;
3333
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,10 @@ const enumsMap: { [key: string]: any[] } = {
15491549
MetricMonitorType: ["monitors"],
15501550
MetricNotebookType: ["notebooks"],
15511551
MetricSLOType: ["slos"],
1552+
MetricTagConfigurationMetricTypeCategory: [
1553+
"non_distribution",
1554+
"distribution",
1555+
],
15521556
MetricTagConfigurationMetricTypes: ["gauge", "count", "rate", "distribution"],
15531557
MetricTagConfigurationType: ["manage_tags"],
15541558
MetricType: ["metrics"],

0 commit comments

Comments
 (0)