diff --git a/.apigentools-info b/.apigentools-info index 53d3f9e462f8..eed2baa02cb1 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-14 16:33:13.933543", - "spec_repo_commit": "c0287407" + "regenerated": "2025-04-14 20:12:02.270255", + "spec_repo_commit": "71455c7c" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-14 16:33:13.949636", - "spec_repo_commit": "c0287407" + "regenerated": "2025-04-14 20:12:02.286393", + "spec_repo_commit": "71455c7c" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b69f15d75a3b..3a8dd1b9344d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -19827,47 +19827,6 @@ components: - time - space type: object - MetricCustomAggregations: - description: 'A list of queryable aggregation combinations for a count, rate, - or gauge metric. - - By default, count and rate metrics require the (time: sum, space: sum) aggregation - and - - Gauge metrics require the (time: avg, space: avg) aggregation. - - Additional time & space combinations are also available: - - - - time: avg, space: avg - - - time: avg, space: max - - - time: avg, space: min - - - time: avg, space: sum - - - time: count, space: sum - - - time: max, space: max - - - time: min, space: min - - - time: sum, space: avg - - - time: sum, space: sum - - - Can only be applied to non_distribution metrics that have a `metric_type` - of `count`, `rate`, or `gauge`.' - example: - - space: sum - time: sum - - space: sum - time: count - items: - $ref: '#/components/schemas/MetricCustomAggregation' - type: array MetricCustomSpaceAggregation: description: A space aggregation for use in query. enum: @@ -20371,9 +20330,6 @@ components: description: Object for a single metric tag configuration. example: attributes: - aggregations: - - space: avg - time: avg created_at: '2020-03-25T09:48:37.463835Z' metric_type: gauge modified_at: '2020-04-25T09:48:37.463835Z' @@ -20394,8 +20350,6 @@ components: description: Object containing the definition of a metric tag configuration attributes. properties: - aggregations: - $ref: '#/components/schemas/MetricCustomAggregations' created_at: description: Timestamp when the tag configuration was created. example: '2020-03-25T09:48:37.463835Z' @@ -20438,8 +20392,6 @@ components: description: Object containing the definition of a metric tag configuration to be created. properties: - aggregations: - $ref: '#/components/schemas/MetricCustomAggregations' exclude_tags_mode: description: 'When set to true, the configuration will exclude the configured tags and include any other submitted tags. @@ -20549,8 +20501,6 @@ components: description: Object containing the definition of a metric tag configuration to be updated. properties: - aggregations: - $ref: '#/components/schemas/MetricCustomAggregations' exclude_tags_mode: description: 'When set to true, the configuration will exclude the configured tags and include any other submitted tags. @@ -45229,9 +45179,8 @@ paths: - metric_tags_write /api/v2/metrics/{metric_name}/active-configurations: get: - description: List tags and aggregations that are actively queried on dashboards, - notebooks, monitors, the Metrics Explorer, and using the API for a given metric - name. + description: List tags that are actively queried on dashboards, notebooks, monitors, + the Metrics Explorer, and using the API for a given metric name. operationId: ListActiveMetricConfigurations parameters: - $ref: '#/components/parameters/MetricName' @@ -45277,7 +45226,7 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Too Many Requests - summary: List active tags and aggregations + summary: List active tags tags: - Metrics x-permission: @@ -45381,9 +45330,8 @@ paths: - Metrics /api/v2/metrics/{metric_name}/estimate: get: - description: Returns the estimated cardinality for a metric with a given tag, - percentile and number of aggregations configuration using Metrics without - Limits™. + description: Returns the estimated cardinality for a metric with a given tag + and percentile configuration using Metrics without Limits™. operationId: EstimateMetricsOutputSeries parameters: - $ref: '#/components/parameters/MetricName' @@ -45405,16 +45353,6 @@ paths: maximum: 2147483647 minimum: 49 type: integer - - description: The number of aggregations that a `count`, `rate`, or `gauge` - metric is configured to use. Max number of aggregation combos is 9. - example: 1 - in: query - name: filter[num_aggregations] - required: false - schema: - format: int32 - maximum: 9 - type: integer - description: A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. example: true @@ -45550,13 +45488,10 @@ paths: - metrics_read patch: description: 'Update the tag configuration of a metric or percentile aggregations - of a distribution metric or custom aggregations + of a distribution metric. By setting `exclude_tags_mode` - of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true - the behavior is changed - - from an allow-list to a deny-list, and tags in the defined list will not be - queryable. + to true the behavior is changed from an allow-list to a deny-list, and tags + in the defined list will not be queryable. Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires @@ -45614,17 +45549,14 @@ paths: description: 'Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. - Optionally, include percentile aggregations on any distribution metric or - configure custom aggregations - - on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true - the behavior is changed + Optionally, include percentile aggregations on any distribution metric. By + setting `exclude_tags_mode` - from an allow-list to a deny-list, and tags in the defined list will not be - queryable. + to true the behavior is changed from an allow-list to a deny-list, and tags + in the defined list will not - Can only be used with application keys of users with the `Manage Tags for - Metrics` permission.' + be queryable. Can only be used with application keys of users with the `Manage + Tags for Metrics` permission.' operationId: CreateTagConfiguration parameters: - $ref: '#/components/parameters/MetricName' diff --git a/examples/v2/metrics/EstimateMetricsOutputSeries.ts b/examples/v2/metrics/EstimateMetricsOutputSeries.ts index cd3feb2ed142..665fd1f76125 100644 --- a/examples/v2/metrics/EstimateMetricsOutputSeries.ts +++ b/examples/v2/metrics/EstimateMetricsOutputSeries.ts @@ -10,7 +10,6 @@ const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiEstimateMetricsOutputSeriesRequest = { metricName: "system.cpu.idle", filterGroups: "app,host", - filterNumAggregations: 4, }; apiInstance diff --git a/examples/v2/metrics/ListActiveMetricConfigurations.ts b/examples/v2/metrics/ListActiveMetricConfigurations.ts index e28ef8e6de61..e9e61e12b2ee 100644 --- a/examples/v2/metrics/ListActiveMetricConfigurations.ts +++ b/examples/v2/metrics/ListActiveMetricConfigurations.ts @@ -1,5 +1,5 @@ /** - * List active tags and aggregations returns "Success" response + * List active tags returns "Success" response */ import { client, v2 } from "@datadog/datadog-api-client"; @@ -8,7 +8,7 @@ const configuration = client.createConfiguration(); const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiListActiveMetricConfigurationsRequest = { - metricName: "static_test_metric_donotdelete", + metricName: "metric_name", }; apiInstance diff --git a/examples/v2/metrics/ListActiveMetricConfigurations_2806781557.ts b/examples/v2/metrics/ListActiveMetricConfigurations_2806781557.ts new file mode 100644 index 000000000000..e28ef8e6de61 --- /dev/null +++ b/examples/v2/metrics/ListActiveMetricConfigurations_2806781557.ts @@ -0,0 +1,21 @@ +/** + * List active tags and aggregations returns "Success" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MetricsApi(configuration); + +const params: v2.MetricsApiListActiveMetricConfigurationsRequest = { + metricName: "static_test_metric_donotdelete", +}; + +apiInstance + .listActiveMetricConfigurations(params) + .then((data: v2.MetricSuggestedTagsAndAggregationsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 88ed4b68a596..359fc5d89cf6 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -4802,10 +4802,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { "type": "number", "format": "int32", }, - "filterNumAggregations": { - "type": "number", - "format": "int32", - }, "filterPct": { "type": "boolean", "format": "", diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index b69e8dc104c3..a9ab1f5d4e70 100644 --- a/features/v2/metrics.feature +++ b/features/v2/metrics.feature @@ -152,8 +152,19 @@ Feature: Metrics Then the response status is 200 Success And the response "data[0].type" is equal to "manage_tags" + @skip-validation @team:DataDog/metrics-experience + Scenario: List active tags and aggregations returns "Success" response + Given a valid "appKeyAuth" key in the system + And there is a valid "metric_static" in the system + And new "ListActiveMetricConfigurations" request + And request contains "metric_name" parameter with value "static_test_metric_donotdelete" + When the request is sent + Then the response status is 200 Success + And the response "data.type" is equal to "actively_queried_configurations" + And the response "data.id" is equal to "static_test_metric_donotdelete" + @generated @skip @team:DataDog/metrics-experience - Scenario: List active tags and aggregations returns "Bad Request" response + Scenario: List active tags returns "Bad Request" response Given a valid "appKeyAuth" key in the system And new "ListActiveMetricConfigurations" request And request contains "metric_name" parameter from "REPLACE.ME" @@ -161,23 +172,20 @@ Feature: Metrics Then the response status is 400 Bad Request @generated @skip @team:DataDog/metrics-experience - Scenario: List active tags and aggregations returns "Not Found" response + Scenario: List active tags returns "Not Found" response Given a valid "appKeyAuth" key in the system And new "ListActiveMetricConfigurations" request And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @skip-validation @team:DataDog/metrics-experience - Scenario: List active tags and aggregations returns "Success" response + @generated @skip @team:DataDog/metrics-experience + Scenario: List active tags returns "Success" response Given a valid "appKeyAuth" key in the system - And there is a valid "metric_static" in the system And new "ListActiveMetricConfigurations" request - And request contains "metric_name" parameter with value "static_test_metric_donotdelete" + And request contains "metric_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 Success - And the response "data.type" is equal to "actively_queried_configurations" - And the response "data.id" is equal to "static_test_metric_donotdelete" @generated @skip @team:DataDog/metrics-experience Scenario: List distinct metric volumes by metric name returns "Bad Request" response @@ -370,7 +378,6 @@ Feature: Metrics Given new "EstimateMetricsOutputSeries" request And request contains "metric_name" parameter with value "system.cpu.idle" And request contains "filter[groups]" parameter with value "app,host" - And request contains "filter[num_aggregations]" parameter with value 4 When the request is sent Then the response status is 200 Success diff --git a/packages/datadog-api-client-v2/apis/MetricsApi.ts b/packages/datadog-api-client-v2/apis/MetricsApi.ts index 1e369d6f7873..d9c8ff876e56 100644 --- a/packages/datadog-api-client-v2/apis/MetricsApi.ts +++ b/packages/datadog-api-client-v2/apis/MetricsApi.ts @@ -213,7 +213,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { metricName: string, filterGroups?: string, filterHoursAgo?: number, - filterNumAggregations?: number, filterPct?: boolean, filterTimespanH?: number, _options?: Configuration @@ -253,13 +252,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { "" ); } - if (filterNumAggregations !== undefined) { - requestContext.setQueryParam( - "filter[num_aggregations]", - ObjectSerializer.serialize(filterNumAggregations, "number", "int32"), - "" - ); - } if (filterPct !== undefined) { requestContext.setQueryParam( "filter[pct]", @@ -1755,11 +1747,6 @@ export interface MetricsApiEstimateMetricsOutputSeriesRequest { * @type number */ filterHoursAgo?: number; - /** - * The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9. - * @type number - */ - filterNumAggregations?: number; /** * A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators. * @type boolean @@ -1964,10 +1951,9 @@ export class MetricsApi { /** * Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric. - * Optionally, include percentile aggregations on any distribution metric or configure custom aggregations - * on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed - * from an allow-list to a deny-list, and tags in the defined list will not be queryable. - * Can only be used with application keys of users with the `Manage Tags for Metrics` permission. + * Optionally, include percentile aggregations on any distribution metric. By setting `exclude_tags_mode` + * to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not + * be queryable. Can only be used with application keys of users with the `Manage Tags for Metrics` permission. * @param param The request object */ public createTagConfiguration( @@ -2038,7 +2024,7 @@ export class MetricsApi { } /** - * Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits™. + * Returns the estimated cardinality for a metric with a given tag and percentile configuration using Metrics without Limits™. * @param param The request object */ public estimateMetricsOutputSeries( @@ -2050,7 +2036,6 @@ export class MetricsApi { param.metricName, param.filterGroups, param.filterHoursAgo, - param.filterNumAggregations, param.filterPct, param.filterTimespanH, options @@ -2067,7 +2052,7 @@ export class MetricsApi { } /** - * List tags and aggregations that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name. + * List tags that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name. * @param param The request object */ public listActiveMetricConfigurations( @@ -2352,9 +2337,8 @@ export class MetricsApi { } /** - * Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations - * of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed - * from an allow-list to a deny-list, and tags in the defined list will not be queryable. + * Update the tag configuration of a metric or percentile aggregations of a distribution metric. By setting `exclude_tags_mode` + * to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not be queryable. * Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires * a tag configuration to be created first. * @param param The request object diff --git a/packages/datadog-api-client-v2/models/MetricTagConfigurationAttributes.ts b/packages/datadog-api-client-v2/models/MetricTagConfigurationAttributes.ts index bf93102d84fb..3d8a94b9467a 100644 --- a/packages/datadog-api-client-v2/models/MetricTagConfigurationAttributes.ts +++ b/packages/datadog-api-client-v2/models/MetricTagConfigurationAttributes.ts @@ -3,7 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { MetricCustomAggregation } from "./MetricCustomAggregation"; import { MetricTagConfigurationMetricTypes } from "./MetricTagConfigurationMetricTypes"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,25 +11,6 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Object containing the definition of a metric tag configuration attributes. */ export class MetricTagConfigurationAttributes { - /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. - * By default, count and rate metrics require the (time: sum, space: sum) aggregation and - * Gauge metrics require the (time: avg, space: avg) aggregation. - * Additional time & space combinations are also available: - * - * - time: avg, space: avg - * - time: avg, space: max - * - time: avg, space: min - * - time: avg, space: sum - * - time: count, space: sum - * - time: max, space: max - * - time: min, space: min - * - time: sum, space: avg - * - time: sum, space: sum - * - * Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. - */ - "aggregations"?: Array; /** * Timestamp when the tag configuration was created. */ @@ -75,10 +55,6 @@ export class MetricTagConfigurationAttributes { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - aggregations: { - baseName: "aggregations", - type: "Array", - }, createdAt: { baseName: "created_at", type: "Date", diff --git a/packages/datadog-api-client-v2/models/MetricTagConfigurationCreateAttributes.ts b/packages/datadog-api-client-v2/models/MetricTagConfigurationCreateAttributes.ts index f206d34183b1..a3738460d8f4 100644 --- a/packages/datadog-api-client-v2/models/MetricTagConfigurationCreateAttributes.ts +++ b/packages/datadog-api-client-v2/models/MetricTagConfigurationCreateAttributes.ts @@ -3,7 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { MetricCustomAggregation } from "./MetricCustomAggregation"; import { MetricTagConfigurationMetricTypes } from "./MetricTagConfigurationMetricTypes"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,25 +11,6 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Object containing the definition of a metric tag configuration to be created. */ export class MetricTagConfigurationCreateAttributes { - /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. - * By default, count and rate metrics require the (time: sum, space: sum) aggregation and - * Gauge metrics require the (time: avg, space: avg) aggregation. - * Additional time & space combinations are also available: - * - * - time: avg, space: avg - * - time: avg, space: max - * - time: avg, space: min - * - time: avg, space: sum - * - time: count, space: sum - * - time: max, space: max - * - time: min, space: min - * - time: sum, space: avg - * - time: sum, space: sum - * - * Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. - */ - "aggregations"?: Array; /** * When set to true, the configuration will exclude the configured tags and include any other submitted tags. * When set to false, the configuration will include the configured tags and exclude any other submitted tags. @@ -67,10 +47,6 @@ export class MetricTagConfigurationCreateAttributes { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - aggregations: { - baseName: "aggregations", - type: "Array", - }, excludeTagsMode: { baseName: "exclude_tags_mode", type: "boolean", diff --git a/packages/datadog-api-client-v2/models/MetricTagConfigurationUpdateAttributes.ts b/packages/datadog-api-client-v2/models/MetricTagConfigurationUpdateAttributes.ts index 59b441f94b22..ced2e4758315 100644 --- a/packages/datadog-api-client-v2/models/MetricTagConfigurationUpdateAttributes.ts +++ b/packages/datadog-api-client-v2/models/MetricTagConfigurationUpdateAttributes.ts @@ -3,7 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { MetricCustomAggregation } from "./MetricCustomAggregation"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -11,25 +10,6 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Object containing the definition of a metric tag configuration to be updated. */ export class MetricTagConfigurationUpdateAttributes { - /** - * A list of queryable aggregation combinations for a count, rate, or gauge metric. - * By default, count and rate metrics require the (time: sum, space: sum) aggregation and - * Gauge metrics require the (time: avg, space: avg) aggregation. - * Additional time & space combinations are also available: - * - * - time: avg, space: avg - * - time: avg, space: max - * - time: avg, space: min - * - time: avg, space: sum - * - time: count, space: sum - * - time: max, space: max - * - time: min, space: min - * - time: sum, space: avg - * - time: sum, space: sum - * - * Can only be applied to non_distribution metrics that have a `metric_type` of `count`, `rate`, or `gauge`. - */ - "aggregations"?: Array; /** * When set to true, the configuration will exclude the configured tags and include any other submitted tags. * When set to false, the configuration will include the configured tags and exclude any other submitted tags. @@ -62,10 +42,6 @@ export class MetricTagConfigurationUpdateAttributes { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - aggregations: { - baseName: "aggregations", - type: "Array", - }, excludeTagsMode: { baseName: "exclude_tags_mode", type: "boolean",