Skip to content

Commit 67aaeab

Browse files
authored
Merge pull request DataDog#10673 from DataDog/jorie/mwl-guide
(DOCS-2001) Metrics without limits getting started guide
2 parents 80bf18d + 84eca81 commit 67aaeab

File tree

6 files changed

+139
-0
lines changed

6 files changed

+139
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Getting Started with Metrics without Limits™
3+
kind: guide
4+
is_beta: true
5+
---
6+
7+
<div class="alert alert-warning">This functionality is in private beta.</div>
8+
9+
## Overview
10+
11+
This guide covers how to get started with Metrics without Limits™ and quickly gain the most value from the feature.
12+
13+
1. Review the [Metrics without Limits™ FAQ][1].
14+
15+
2. If you're using the Create Tag Configuration API, use the [tag configuration cardinality estimator API][2] first to validate the potential impact of your tag configurations prior to using the API above to create tag configurations.
16+
17+
If the UI or the estimator API returns a resulting number of indexed that is [larger than ingested](#why-is-my-indexed-volume-greater-than-ingested-volume), do not save your tag configuration.
18+
19+
3. Configure your Top 20 metrics on the Usage page, or [with the API][3].
20+
21+
You can use bulk metric configuration (`*` syntax) to quickly configure tags on multiple metrics.
22+
23+
{{< img src="metrics/guide/bulk-tag-configuration.gif" alt="Applying bulk tag configuration" style="width:80%;" >}}
24+
25+
Datadog notifies you when the bulk configuration job is completed.
26+
27+
### Other tips
28+
29+
You can set up alerts on your real-time [estimated custom metrics usage][4] metric so that you can correlate spikes in custom metrics with configurations.
30+
31+
32+
[Role based access control][5] for Metrics without Limits™ is also available to control which users have permissions to use this feature that has billing implications.
33+
34+
35+
Audit events allow you to track any tag configurations or percentile aggregations that have been made that may correlate with custom metrics spikes. Search for “queryable tag configuration” or “percentile aggregations”.
36+
37+
### Why is my indexed volume greater than ingested volume?
38+
39+
This is not a bug -- your current proposed tag configuration doesn't reduce the metric's cardinality enough to offset the effects of how Metrics without Limits™ is designed.
40+
41+
* When a count, gauge, or rate metric **is not configured** with Metrics without Limits™, Datadog can slice, dice, and aggregate the appropriate raw data at query time to provide you mathematically accurate results.
42+
43+
44+
* When a count, gauge, or rate metric **is configured** with Metrics without Limits™, given a specified tag configuration, the original raw data must be recombined and aggregated prior to query time to preserve the accuracy of your query results and values.
45+
46+
Because of this, Datadog stores six different time/space aggregations (shown below with check marks) for each remaining tag value combination defined by your tag configuration. Refer to the docs on [the anatomy of a metric][6] to review what time/space aggregations are, and how they work.
47+
| | Time AVG | Time SUM | Time MIN | Time MAX |
48+
|-----------|-----------|-----------|-----------|-----------|
49+
| Space AVG | {{< X >}} | {{< X >}} | | |
50+
| Space SUM | {{< X >}} | {{< X >}} | | |
51+
| Space MIN | {{< X >}} | | | |
52+
| Space MAX | {{< X >}} | | | |
53+
54+
If a combination you need for query does not have a check mark, it is best to not configure this particular metric with Metrics without Limits™
55+
56+
Therefore, you can have a resulting indexed custom metric volume greater than an ingested custom metric volume if the tag combination specified does not reduce the number of remaining tag value combinations enough to offset the 6x factor.
57+
58+
Here is a simplified example of how indexed greater than ingested can occur when you start with four tag value combinations on a gauge metric, or in other words, **four custom metrics**:
59+
60+
{{< img src="metrics/guide/before-mwl.jpg" alt="Flow chart with four custom metrics from two hosts" style="width:80%;" >}}
61+
62+
If you use Metrics without Limits™ and configure on `{endpoint, status}`:
63+
64+
{{< img src="metrics/guide/after-mwl.jpg" alt="Flow chart with the hosts marked out with x" style="width:80%;" >}}
65+
66+
Without the host, this leaves three remaining tag combinations:
67+
68+
1. `{endpoint:x, status:200}`
69+
2. `{endpoint:x, status:400}`
70+
3. `{endpoint:y, status:200}`
71+
72+
However, for each of these three combinations, Metrics without Limits™ stores six pre-aggregated values, so this results in **18 custom metrics total**. Therefore, the metric count is smaller when left unconfigured.
73+
74+
75+
[1]: /metrics/faq/metrics-without-limits/
76+
[2]: /metrics/guide/tag-configuration-cardinality-estimation-tool/
77+
[3]: /api/latest/metrics/#create-a-tag-configuration
78+
[4]: /account_management/billing/usage_metrics/
79+
[5]: /account_management/rbac/permissions/?tab=ui#metrics
80+
[6]: /metrics/#time-and-space-aggregation
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: The Tag Configuration Cardinality Estimation Tool
3+
kind: guide
4+
is_beta: true
5+
---
6+
7+
<div class="alert alert-warning">This functionality is in private beta and the endpoint is likely to change.</div>
8+
9+
## Overview
10+
11+
The tag configuration cardinality estimation tool helps you estimate how many distinct custom metrics result from a particular tag configuration for a given metric. Before you begin, you need a [Datadog API and app key][1].
12+
13+
### Path
14+
15+
```
16+
GET https://api.datadoghq.com/api/metric/estimate
17+
```
18+
19+
## Request
20+
21+
### Parameters
22+
23+
| Field | Type | Description |
24+
|---------------------------|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
25+
| `metric_name` (*required*) | string | Name of the metric to estimate. |
26+
| `groups[]` | lists of strings | Groups to include when estimating output of a timeseries. |
27+
| `hours_ago` | integer | The number of hours to go back to get historical data. Default value is 49, values lower than 49 are unlikely to produce accurate results. |
28+
| `timespan_h` | integer | The number of hours before the `hours_ago` value to track. Datadog recommends a one-hour time span. |
29+
| `pct` | boolean | Calculates the number of percentile output series instead of distribution, count or gauge. Defaults to `false`. Only works for distribution metrics, otherwise it returns an error. |
30+
31+
### Example
32+
33+
```curl
34+
https://api.datadoghq.com/metric/estimate?metric_name=dist.dd.dogweb.latency&groups[]=host&groups[]=page&hours_ago=120&pct=true
35+
```
36+
37+
## Response
38+
39+
### Model
40+
41+
| Field | Type | Description |
42+
|---------------------------|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
43+
| `estimated_output_series` | integer | A count of unique timeseries output as of the timespan specified by the request for the groups specified (from `hours_ago` from now to `hours_ago` minus `timespan_h` from now). |
44+
| `estimate_type` | string | The type of metric being estimated. One of: [distribution][2], [percentile][3], [count][4], [gauge][5]. |
45+
| `as_of` | timestamp string | The UTC timestamp of the most recent data used ( `hours_ago` from now). Example: `2020-04-16 09:25:40.214469`. |
46+
47+
### Example
48+
49+
```json
50+
{"estimated_output_series":35334,"estimate_type":"percentile","as_of":"2020-04-16 09:29:57.789176"}
51+
```
52+
53+
54+
55+
[1]: /account_management/api-app-keys/
56+
[2]: /developers/metrics/types/?tab=distribution#metric-types
57+
[3]: /developers/metrics/types/?tab=distribution#calculation-of-percentile-aggregations
58+
[4]: /developers/metrics/types/?tab=count#metric-types
59+
[5]: /developers/metrics/types/?tab=gauge#metric-types
326 KB
Loading
315 KB
Loading
1.34 MB
Loading
51.4 KB
Loading

0 commit comments

Comments
 (0)