Skip to content
Merged
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
12 changes: 10 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66274,7 +66274,7 @@ components:
MetricEstimateType:
default: count_or_gauge
description: |-
Estimate type based on the queried configuration. By default, `count_or_gauge` is returned. `distribution` is returned for distribution metrics without percentiles enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried with a distribution metric.
Estimate type based on the queried configuration. `count_or_gauge` is returned by default, and `distribution` is returned for distribution metrics. The `filter[pct]` query parameter has no effect on this value.
enum:
- count_or_gauge
- distribution
Expand Down Expand Up @@ -171024,6 +171024,14 @@ paths:
required: false
schema:
type: string
- description: |-
When `true`, `filter[groups]` is treated as an exclude list instead of an include list. Defaults to `false`.
example: false
in: query
name: filter[exclude_tags_mode]
required: false
schema:
type: boolean
- description: The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours.
example: 49
in: query
Expand All @@ -171043,7 +171051,7 @@ paths:
format: int32
maximum: 9
type: integer
- description: A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
- description: Deprecated. This query parameter has no effect on the estimate.
example: true
in: query
name: filter[pct]
Expand Down
13 changes: 12 additions & 1 deletion src/datadog_api_client/v2/api/metrics_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ def __init__(self, api_client=None):
"attribute": "filter[groups]",
"location": "query",
},
"filter_exclude_tags_mode": {
"openapi_types": (bool,),
"attribute": "filter[exclude_tags_mode]",
"location": "query",
},
"filter_hours_ago": {
"validation": {
"inclusive_maximum": 2147483647,
Expand Down Expand Up @@ -1116,6 +1121,7 @@ def estimate_metrics_output_series(
metric_name: str,
*,
filter_groups: Union[str, UnsetType] = unset,
filter_exclude_tags_mode: Union[bool, UnsetType] = unset,
filter_hours_ago: Union[int, UnsetType] = unset,
filter_num_aggregations: Union[int, UnsetType] = unset,
filter_pct: Union[bool, UnsetType] = unset,
Expand All @@ -1129,11 +1135,13 @@ def estimate_metrics_output_series(
:type metric_name: str
:param filter_groups: Comma-separated list of tag keys that the metric is configured to query with. For example: ``filter[groups]=app,host``.
:type filter_groups: str, optional
:param filter_exclude_tags_mode: When ``true`` , ``filter[groups]`` is treated as an exclude list instead of an include list. Defaults to ``false``.
:type filter_exclude_tags_mode: bool, 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: Deprecated. Number of aggregations has no impact on volume.
: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.
:param filter_pct: Deprecated. This query parameter has no effect on the estimate.
: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.
:type filter_timespan_h: int, optional
Expand All @@ -1145,6 +1153,9 @@ def estimate_metrics_output_series(
if filter_groups is not unset:
kwargs["filter_groups"] = filter_groups

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
"""
Object containing the definition of a metric estimate attribute.

:param estimate_type: Estimate type based on the queried configuration. By default, ``count_or_gauge`` is returned. ``distribution`` is returned for distribution metrics without percentiles enabled. Lastly, ``percentile`` is returned if ``filter[pct]=true`` is queried with a distribution metric.
:param estimate_type: Estimate type based on the queried configuration. ``count_or_gauge`` is returned by default, and ``distribution`` is returned for distribution metrics. The ``filter[pct]`` query parameter has no effect on this value.
:type estimate_type: MetricEstimateType, optional

:param estimated_at: Timestamp when the cardinality estimate was requested.
Expand Down
2 changes: 1 addition & 1 deletion src/datadog_api_client/v2/model/metric_estimate_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class MetricEstimateType(ModelSimple):
"""
Estimate type based on the queried configuration. By default, `count_or_gauge` is returned. `distribution` is returned for distribution metrics without percentiles enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried with a distribution metric.
Estimate type based on the queried configuration. `count_or_gauge` is returned by default, and `distribution` is returned for distribution metrics. The `filter[pct]` query parameter has no effect on this value.

:param value: If omitted defaults to "count_or_gauge". Must be one of ["count_or_gauge", "distribution", "percentile"].
:type value: str
Expand Down
Loading