Skip to content

MWL no longer requires customers to configure specific time/space aggrs #2507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-14 16:33:13.508002",
"spec_repo_commit": "c0287407"
"regenerated": "2025-04-14 20:12:01.729649",
"spec_repo_commit": "71455c7c"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-14 16:33:13.522553",
"spec_repo_commit": "c0287407"
"regenerated": "2025-04-14 20:12:01.744856",
"spec_repo_commit": "71455c7c"
}
}
}
96 changes: 14 additions & 82 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
7 changes: 0 additions & 7 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8460,13 +8460,6 @@ datadog\_api\_client.v2.model.metric\_custom\_aggregation module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.metric\_custom\_aggregations module
-----------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.metric_custom_aggregations
:members:
:show-inheritance:

datadog\_api\_client.v2.model.metric\_custom\_space\_aggregation module
-----------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/EstimateMetricsOutputSeries.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
response = api_instance.estimate_metrics_output_series(
metric_name="system.cpu.idle",
filter_groups="app,host",
filter_num_aggregations=4,
)

print(response)
4 changes: 2 additions & 2 deletions examples/v2/metrics/ListActiveMetricConfigurations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
List active tags and aggregations returns "Success" response
List active tags returns "Success" response
"""

from datadog_api_client import ApiClient, Configuration
Expand All @@ -9,7 +9,7 @@
with ApiClient(configuration) as api_client:
api_instance = MetricsApi(api_client)
response = api_instance.list_active_metric_configurations(
metric_name="static_test_metric_donotdelete",
metric_name="metric_name",
)

print(response)
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
List active tags and aggregations returns "Success" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.metrics_api import MetricsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = MetricsApi(api_client)
response = api_instance.list_active_metric_configurations(
metric_name="static_test_metric_donotdelete",
)

print(response)
32 changes: 8 additions & 24 deletions src/datadog_api_client/v2/api/metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,6 @@ def __init__(self, api_client=None):
"attribute": "filter[hours_ago]",
"location": "query",
},
"filter_num_aggregations": {
"validation": {
"inclusive_maximum": 9,
},
"openapi_types": (int,),
"attribute": "filter[num_aggregations]",
"location": "query",
},
"filter_pct": {
"openapi_types": (bool,),
"attribute": "filter[pct]",
Expand Down Expand Up @@ -526,10 +518,9 @@ def create_tag_configuration(
"""Create a tag configuration.

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 metric_name: The name of the metric.
:type metric_name: str
Expand Down Expand Up @@ -586,22 +577,19 @@ def estimate_metrics_output_series(
*,
filter_groups: Union[str, UnsetType] = unset,
filter_hours_ago: Union[int, UnsetType] = unset,
filter_num_aggregations: Union[int, UnsetType] = unset,
filter_pct: Union[bool, UnsetType] = unset,
filter_timespan_h: Union[int, UnsetType] = unset,
) -> MetricEstimateResponse:
"""Tag Configuration Cardinality Estimator.

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 metric_name: The name of the metric.
:type metric_name: str
:param filter_groups: Filtered tag keys that the metric is configured to query with.
:type filter_groups: str, optional
:param filter_hours_ago: The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours.
:type filter_hours_ago: int, optional
:param filter_num_aggregations: The number of aggregations that a ``count`` , ``rate`` , or ``gauge`` metric is configured to use. Max number of aggregation combos is 9.
:type filter_num_aggregations: int, optional
:param filter_pct: A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
:type filter_pct: bool, optional
:param filter_timespan_h: A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour.
Expand All @@ -617,9 +605,6 @@ def estimate_metrics_output_series(
if filter_hours_ago is not unset:
kwargs["filter_hours_ago"] = filter_hours_ago

if filter_num_aggregations is not unset:
kwargs["filter_num_aggregations"] = filter_num_aggregations

if filter_pct is not unset:
kwargs["filter_pct"] = filter_pct

Expand All @@ -634,9 +619,9 @@ def list_active_metric_configurations(
*,
window_seconds: Union[int, UnsetType] = unset,
) -> MetricSuggestedTagsAndAggregationsResponse:
"""List active tags and aggregations.
"""List active tags.

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 metric_name: The name of the metric.
:type metric_name: str
Expand Down Expand Up @@ -973,9 +958,8 @@ def update_tag_configuration(
) -> MetricTagConfigurationResponse:
"""Update a tag configuration.

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.

Expand Down
42 changes: 0 additions & 42 deletions src/datadog_api_client/v2/model/metric_custom_aggregations.py

This file was deleted.

Loading
Loading