Skip to content

datadog tag-configuration-cardinality-estimator

Returns the estimated cardinality for a metric

Description

Returns the estimated cardinality for a metric

Synopsis

datadog tag-configuration-cardinality-estimator
    [--site <site>]
    <metric_name>
    [--groups <groups>]
    [--hours <hours>]
    [--aggregations <aggregations>]
    [--percentile]
    [--timespan <timespan>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

metric_name - (string)

     Name of the metric
     Example: "metric_name-1"
     Default: _None_      Attributes: required

groups - (string)

     Filtered tag keys that the metric is configured to query with
     Example: --groups "groups-1"
     Default: _None_      Attributes: optional

hours - (duration)

     The duration to look back (from now) to estimate cardinality with
     Example: --hours "5 seconds"
     Default: _None_      Attributes: optional

aggregations - (int)

     The number of aggregations that a count, rate, or gauge metric is configured to use
     Example: --aggregations 1
     Default: _None_      Attributes: optional

     Validation:
         max: 9

percentile - (bool)

     A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators
     Example: --percentile
     Default: _None_      Attributes: optional

timespan - (duration)

     A window, in hours, from the look back to estimate cardinality with
     Example: --timespan "5 seconds"
     Default: _None_      Attributes: optional

Examples

Input:

!datadog tag-configuration-cardinality-estimator --metric_name "datadog.dogstatsd.client.aggregated_context"
Output:
ID                                          TYPE                        ESTIMATE-TYPE   ESTIMATED-AT                  ESTIMATED-OUTPUT-SERIES
datadog.dogstatsd.client.aggregated_context metric_cardinality_estimate count_or_gauge  2023-01-08T02:59:13.450217Z   1

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "datadog"
Service Instance
Namespace
Object Type "timeseries_points"
Object ID

Please see Access Control for details.