@@ -3987,6 +3987,63 @@ components:
3987
3987
type : string
3988
3988
x-enum-varnames :
3989
3989
- DISTINCT_METRIC_VOLUMES
3990
+ MetricEstimate :
3991
+ description : Object for a metric cardinality estimate.
3992
+ properties :
3993
+ attributes :
3994
+ $ref : ' #/components/schemas/MetricEstimateAttributes'
3995
+ id :
3996
+ $ref : ' #/components/schemas/MetricName'
3997
+ type :
3998
+ $ref : ' #/components/schemas/MetricEstimateResourceType'
3999
+ type : object
4000
+ MetricEstimateAttributes :
4001
+ description : Object containing the definition of a metric estimate attribute.
4002
+ properties :
4003
+ estimate_type :
4004
+ $ref : ' #/components/schemas/MetricEstimateType'
4005
+ estimated_at :
4006
+ description : Timestamp when the cardinality estimate was requested.
4007
+ example : ' 2022-04-27T09:48:37.463835Z'
4008
+ format : date-time
4009
+ type : string
4010
+ estimated_output_series :
4011
+ description : Estimated cardinality of the metric based on the queried configuration.
4012
+ example : 50
4013
+ format : int64
4014
+ type : integer
4015
+ type : object
4016
+ MetricEstimateResourceType :
4017
+ default : metric_cardinality_estimate
4018
+ description : The metric estimate resource type.
4019
+ enum :
4020
+ - metric_cardinality_estimate
4021
+ example : metric_cardinality_estimate
4022
+ type : string
4023
+ x-enum-varnames :
4024
+ - METRIC_CARDINALITY_ESTIMATE
4025
+ MetricEstimateResponse :
4026
+ description : Response object that includes metric cardinality estimates.
4027
+ properties :
4028
+ data :
4029
+ $ref : ' #/components/schemas/MetricEstimate'
4030
+ type : object
4031
+ MetricEstimateType :
4032
+ default : count_or_gauge
4033
+ description : Estimate type based on the queried configuration. By default, `count_or_gauge`
4034
+ is returned. `distribution` is returned for distribution metrics without percentiles
4035
+ enabled. Lastly, `percentile` is returned if `filter[pct]=true` is queried
4036
+ with a distribution metric.
4037
+ enum :
4038
+ - count_or_gauge
4039
+ - distribution
4040
+ - percentile
4041
+ example : distribution
4042
+ type : string
4043
+ x-enum-varnames :
4044
+ - COUNT_OR_GAUGE
4045
+ - DISTRIBUTION
4046
+ - PERCENTILE
3990
4047
MetricIngestedIndexedVolume :
3991
4048
description : Object for a single metric's ingested and indexed volume.
3992
4049
properties :
@@ -9533,6 +9590,106 @@ paths:
9533
9590
x-menu-order : 6
9534
9591
x-undo :
9535
9592
type : safe
9593
+ /api/v2/metrics/{metric_name}/estimate :
9594
+ get :
9595
+ description : Returns a cardinality estimate for a metric with a given tag, percentile,
9596
+ and number of aggregations configuration.
9597
+ operationId : EstimateMetricsOutputSeries
9598
+ parameters :
9599
+ - $ref : ' #/components/parameters/MetricName'
9600
+ - description : Filtered tag groups that the metric is configured to query with.
9601
+ example : app,host
9602
+ in : query
9603
+ name : filter[groups]
9604
+ required : false
9605
+ schema :
9606
+ type : string
9607
+ - description : The number of hours of look back (from now) to estimate cardinality
9608
+ with.
9609
+ example : 49
9610
+ in : query
9611
+ name : filter[hours_ago]
9612
+ required : false
9613
+ schema :
9614
+ type : integer
9615
+ - description : The number of aggregations that a `count`, `rate`, or `gauge`
9616
+ metric is configured to use. Max number of aggregation combos is 9.
9617
+ example : 1
9618
+ in : query
9619
+ name : filter[num_aggregations]
9620
+ required : false
9621
+ schema :
9622
+ type : integer
9623
+ - description : A boolean, for distribution metrics only, to estimate cardinality
9624
+ if the metric includes additional percentile aggregators.
9625
+ example : true
9626
+ in : query
9627
+ name : filter[pct]
9628
+ required : false
9629
+ schema :
9630
+ type : boolean
9631
+ - description : A window, in hours, from the look back to estimate cardinality
9632
+ with.
9633
+ example : 6
9634
+ in : query
9635
+ name : filter[timespan_h]
9636
+ required : false
9637
+ schema :
9638
+ type : integer
9639
+ responses :
9640
+ ' 200 ' :
9641
+ content :
9642
+ application/json :
9643
+ schema :
9644
+ $ref : ' #/components/schemas/MetricEstimateResponse'
9645
+ description : Success
9646
+ ' 400 ' :
9647
+ content :
9648
+ application/json :
9649
+ schema :
9650
+ $ref : ' #/components/schemas/APIErrorResponse'
9651
+ description : API error response.
9652
+ ' 403 ' :
9653
+ content :
9654
+ application/json :
9655
+ schema :
9656
+ $ref : ' #/components/schemas/APIErrorResponse'
9657
+ description : API error response.
9658
+ ' 404 ' :
9659
+ content :
9660
+ application/json :
9661
+ schema :
9662
+ $ref : ' #/components/schemas/APIErrorResponse'
9663
+ description : API error response.
9664
+ ' 429 ' :
9665
+ content :
9666
+ application/json :
9667
+ schema :
9668
+ $ref : ' #/components/schemas/APIErrorResponse'
9669
+ description : Too Many Requests
9670
+ security :
9671
+ - apiKeyAuth : []
9672
+ appKeyAuth : []
9673
+ - AuthZ : []
9674
+ summary : Estimate Output Series - Public v2 API
9675
+ tags :
9676
+ - Metrics
9677
+ x-dd-ownership :
9678
+ notification_configuration :
9679
+ manual_escalation_policy : ' [Points Aggregation] Primary'
9680
+ prod_high_urgency : ' @pagerduty-Points-Aggregation @slack-points-aggr-ops'
9681
+ prod_low_urgency : ' @slack-points-aggr-ops'
9682
+ slack_support_channel : ' #points-aggregation'
9683
+ staging_high_urgency : ' @slack-points-aggr-stg-ops'
9684
+ staging_low_urgency : ' @slack-points-aggr-stg-ops'
9685
+ team : points-aggregation
9686
+ team_escalation : ' [Points Aggregation] Primary'
9687
+ x-menu-order : 10
9688
+ x-permission :
9689
+ operator : OPEN
9690
+ permissions : []
9691
+ x-undo :
9692
+ type : safe
9536
9693
/api/v2/metrics/{metric_name}/tags :
9537
9694
delete :
9538
9695
description : ' Deletes a metric'' s tag configuration. Can only be used with application
0 commit comments