Skip to content

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

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

Closed
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-05-07 17:07:22.766765",
"spec_repo_commit": "a1235a0d"
"regenerated": "2025-05-07 20:12:32.753737",
"spec_repo_commit": "49255f5b"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-07 17:07:22.783724",
"spec_repo_commit": "a1235a0d"
"regenerated": "2025-05-07 20:12:32.772309",
"spec_repo_commit": "49255f5b"
}
}
}
57 changes: 38 additions & 19 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20918,6 +20918,7 @@ components:
- ZSTD1
- GZIP
MetricCustomAggregation:
deprecated: true
description: A time and space aggregation combination for use in query.
example:
space: sum
Expand All @@ -20932,6 +20933,7 @@ components:
- space
type: object
MetricCustomAggregations:
deprecated: true
description: 'A list of queryable aggregation combinations for a count, rate,
or gauge metric.

Expand Down Expand Up @@ -20964,13 +20966,9 @@ components:

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'
deprecated: true
type: array
MetricCustomSpaceAggregation:
description: A space aggregation for use in query.
Expand Down Expand Up @@ -21436,6 +21434,7 @@ components:
time: count
items:
$ref: '#/components/schemas/MetricCustomAggregation'
deprecated: true
type: array
MetricSuggestedTagsAndAggregations:
description: Object for a single metric's actively queried tags and aggregations.
Expand All @@ -21461,6 +21460,7 @@ components:
properties:
active_aggregations:
$ref: '#/components/schemas/MetricSuggestedAggregations'
deprecated: true
active_tags:
description: List of tag keys that have been actively queried.
example:
Expand Down Expand Up @@ -21500,6 +21500,7 @@ components:
properties:
aggregations:
$ref: '#/components/schemas/MetricCustomAggregations'
deprecated: true
created_at:
description: Timestamp when the tag configuration was created.
example: '2020-03-25T09:48:37.463835Z'
Expand Down Expand Up @@ -21544,6 +21545,7 @@ components:
properties:
aggregations:
$ref: '#/components/schemas/MetricCustomAggregations'
deprecated: true
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 @@ -21655,6 +21657,7 @@ components:
properties:
aggregations:
$ref: '#/components/schemas/MetricCustomAggregations'
deprecated: true
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 @@ -50068,9 +50071,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 @@ -50092,8 +50094,9 @@ 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.
- deprecated: true
description: This argument has no effect as all time and space combinations
are now available with no impact on customer bills.
example: 1
in: query
name: filter[num_aggregations]
Expand Down Expand Up @@ -61234,15 +61237,31 @@ tags:
description: Find out more at
url: https://docs.datadoghq.com/logs/logs_to_metrics/
name: Logs Metrics
- description: "The metrics endpoint allows you to:\n\n- Post metrics data so it can
be graphed on Datadog\u2019s dashboards\n- Query metrics from any time period
(timeseries and scalar)\n- Modify tag configurations for metrics\n- View tags
and volumes for metrics\n\n**Note**: A graph can only contain a set number of
points\nand as the timeframe over which a metric is viewed increases,\naggregation
between points occurs to stay below that set number.\n\nThe Post, Patch, and Delete
`manage_tags` API methods can only be performed by\na user who has the `Manage
Tags for Metrics` permission.\n\nSee the [Metrics page](https://docs.datadoghq.com/metrics/)
for more information."
- description: 'The metrics endpoint allows you to:


- Post metrics data so it can be graphed on Datadog dashboards

- Query metrics from any time period (timeseries and scalar)

- Modify tag configurations for metrics

- View tags and volumes for metrics


**Note**: A graph can only contain a set number of points

and as the timeframe over which a metric is viewed increases,

aggregation between points occurs to stay below that set number.


The Post, Patch, and Delete `manage_tags` API methods can only be performed by

a user who has the `Manage Tags for Metrics` permission.


See the [Metrics page](https://docs.datadoghq.com/metrics/) for more information.'
name: Metrics
- description: 'Configure your [Datadog Microsoft Teams integration](https://docs.datadoghq.com/integrations/microsoft_teams/)

Expand Down
1 change: 0 additions & 1 deletion examples/v2/metrics/EstimateMetricsOutputSeries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
api_instance = DatadogAPIClient::V2::MetricsAPI.new
opts = {
filter_groups: "app,host",
filter_num_aggregations: 4,
}
p api_instance.estimate_metrics_output_series("system.cpu.idle", opts)
3 changes: 1 addition & 2 deletions features/v2/metrics.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@endpoint(metrics) @endpoint(metrics-v2)
Feature: Metrics
The metrics endpoint allows you to: - Post metrics data so it can be
graphed on Datadog’s dashboards - Query metrics from any time period
graphed on Datadog dashboards - Query metrics from any time period
(timeseries and scalar) - Modify tag configurations for metrics - View
tags and volumes for metrics **Note**: A graph can only contain a set
number of points and as the timeframe over which a metric is viewed
Expand Down Expand Up @@ -370,7 +370,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

Expand Down
4 changes: 2 additions & 2 deletions lib/datadog_api_client/v2/api/metrics_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@ def estimate_metrics_output_series(metric_name, opts = {})

# 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 [String] The name of the metric.
# @param opts [Hash] the optional parameters
# @option opts [String] :filter_groups Filtered tag keys that the metric is configured to query with.
# @option opts [Integer] :filter_hours_ago The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours.
# @option opts [Integer] :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.
# @option opts [Integer] :filter_num_aggregations This argument has no effect as all time and space combinations are now available with no impact on customer bills.
# @option opts [Boolean] :filter_pct A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
# @option opts [Integer] :filter_timespan_h A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour.
# @return [Array<(MetricEstimateResponse, Integer, Hash)>] MetricEstimateResponse data, response status code and response headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

module DatadogAPIClient::V2
# A time and space aggregation combination for use in query.
#
# @deprecated This model is deprecated.
class MetricCustomAggregation
include BaseGenericModel

Expand Down Expand Up @@ -51,6 +53,7 @@ def self.openapi_types
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
warn "[DEPRECATION] `MetricCustomAggregation` is deprecated."
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MetricCustomAggregation` initialize method"
end
Expand Down
Loading