Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions content/en/dashboards/functions/rollup.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Rollup
description: Control time aggregation and data point intervals using custom rollup functions and moving rollups for metrics.
description: Control time aggregation and datapoint intervals using custom rollup functions and moving rollups for metrics.
aliases:
- /graphing/functions/rollup/
further_reading:
Expand All @@ -12,7 +12,7 @@ further_reading:
Every metric query is inherently aggregated. However, appending the `.rollup()` function at the end of a query allows you to perform custom [time aggregation][1] that overrides the defaults. This function enables you to define:

* The rollup `<interval>`: the interval of time your data is aggregated over ([if larger than the query-enforced rollup interval](#rollup-interval-enforced-vs-custom)).
* The rollup `<aggregator>`: How your data points are aggregated within a given rollup time interval.
* The rollup `<aggregator>`: How your datapoints are aggregated within a given rollup time interval.

To apply a rollup, navigate to the **Add function** (Σ) button of the graphing editor:

Expand All @@ -24,8 +24,8 @@ The function takes two parameters, `<AGGREGATOR>` and optionally `<INTERVAL>`: `

| Parameter | Description |
|------------|-----------------------------------------------------------------------------------------------------------------|
| `<AGGREGATOR>` | Can be `avg`, `sum`, `min`, `max`, or `count`, and defines how data points are aggregated within a given time interval. [Enforced default](#rollup-interval-enforced-vs-custom): `avg`. |
| `<INTERVAL>` | Time (in seconds) of the interval between two data points displayed. Optional. |
| `<AGGREGATOR>` | Can be `avg`, `sum`, `min`, `max`, or `count`, and defines how datapoints are aggregated within a given time interval. [Enforced default](#rollup-interval-enforced-vs-custom): `avg`. |
| `<INTERVAL>` | Time (in seconds) of the interval between two datapoints displayed. Optional. |

You can use them individually or together, for instance `.rollup(sum,120)`. The following bar graph displays a week's worth of CPU usage for a host **without** using the `.rollup()` function:

Expand All @@ -43,13 +43,13 @@ The following bar graph displays the same metric, graphed using a day-long rollu
| `moving_rollup` | Rollup to combine the points in the last X seconds. | `moving_rollup(<METRIC_NAME>, <INTERVAL> , <AGGREGATOR>)` |


Applying the `moving_rollup()` function to a query allows you to combine points from the most recent specified time range—that is, the last X seconds. Like with `.rollup()`, `<AGGREGATOR>` can be `sum`/`min`/`max`/`count`/`avg` and defines how data points are aggregated within the given time interval.
Applying the `moving_rollup()` function to a query allows you to combine points from the most recent specified time range—that is, the last X seconds. Like with `.rollup()`, `<AGGREGATOR>` can be `sum`/`min`/`max`/`count`/`avg` and defines how datapoints are aggregated within the given time interval.

## Rollup interval: enforced vs custom

When graphing, Datadog sets a limit on the number of points per timeseries. To retain visual clarity, a series can have up to 1500 points. To respect this limit, Datadog rolls up datapoints automatically, defaulting to the `avg` method, effectively displaying the average of all datapoints within a time interval for a given metric. The default rollup time interval varies depending on how the data is visualized. See the following chart to reference these default time intervals:

| Timeframe | Rollup Interval, Line Graph | Rollup Interval, Bar Graph | Rollup Interval, API |
| Time frame | Rollup Interval, Line Graph | Rollup Interval, Bar Graph | Rollup Interval, API |
|---------------------|-----------------------------|----------------------------|----------------------|
| The past hour | 20s | 1m | 20s |
| The past four hours | 1m | 2m | 1m |
Expand All @@ -58,7 +58,7 @@ When graphing, Datadog sets a limit on the number of points per timeseries. To r
| The past week | 1hr | 2hr | 1hr |
| The past month | 4hr | 12hr | 4hr |

A custom `.rollup()` function can be used to enforce the type of time aggregation applied (`avg`, `min`, `max`, `count`, or `sum`) and optionally the time interval to rollup. Using this function, you can set the rollup time interval to a different value than the defaults, up to a limit of 1500 points. This supports up to one point per minute over a day.
A custom `.rollup()` function can be used to specify the type of time aggregation applied (`avg`, `min`, `max`, `count`, or `sum`) and optionally the time interval to rollup. Using this function, you can set the rollup time interval to a different value than the defaults, up to a limit of 1500 points. This supports up to one point per minute over a day.

**Note**: Queries for `COUNT` and `RATE` type metrics have the `.as_count()` modifier appended automatically in the UI, which sets the rollup method used to `sum` and disables interpolation. This `.as_count()` is explicitly visible at the end of the query:

Expand Down
19 changes: 14 additions & 5 deletions content/en/dashboards/widgets/distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ further_reading:
text: "Querying"
---

The Distribution visualization shows data aggregated across one or several tags, such as *hosts*. Unlike the [heatmap][1], a distribution graph's x-axis is quantity rather than time.
The Distribution visualization shows data aggregated across one or several tags, such as *hosts*. Unlike the [heat map][1], a distribution graph's x-axis is quantity rather than time.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think heatmap may still be 1 word based on https://docs.datadoghq.com/dashboards/widgets/heatmap/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You... are so right! Let me ask my team why our Vale rule specifies otherwise. We might just need to update the rule.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule update in progress: DataDog/datadog-vale#87

Thanks for flagging!


This visualization displays only a single query; additional queries are disregarded.

Expand All @@ -34,20 +34,29 @@ This visualization displays only a single query; additional queries are disregar

### Configuration

1. Choose the data to graph.The Distribution visualization supports metrics, live processes, APM request latency, log events, and RUM events.
**Note**: This visualization type is useful only when data is aggregated across tag keys, such as for each `host`.
1. Make a selection in the "`avg`/`max`/`min`/`sum by`/" control to see your data across the associated tags.
1. Choose the data to graph. The Distribution visualization supports metrics, live processes, APM request latency, log events, and RUM events.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should still list all of these individually, as we support several more types than this now. Rather than list all 15+ sources, it may be simpler to reframe to "many sources including ..." followed by a sampling to avoid giving the impression that other sources aren't supported.

image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great callout! I'll update.

**Note**: This visualization type is useful only when data is aggregated across tag keys, such as for each `host`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence might no longer be relevant, it applied only when "histogram of groups" was the only type. The "histogram of points" feature enables this visualization to be useful even in the "I don't have a tag key" case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Removing

1. Make a selection in the `avg`/`last`/`max`/`min`/`sum` control to see your data across the associated tags.
1. Customize your graph with the available options.

### Options

#### Histogram of points vs. histogram of groups

The Distribution widget supports two histogram types:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly more future-proof, in case we add more histogram types later:

Suggested change
The Distribution widget supports two histogram types:
The Distribution widget supports these histogram types:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. Added along with other changes locally


- **Histogram of points**: Each individual datapoint (for example, a raw request latency measurement) contributes to a bucket based on its value. Use this when you want to see the full distribution of measurements across all recordings.
- **Histogram of groups**: Each group (such as a service or host) is first reduced to a single aggregated value (for example, the p75 latency), and then those aggregated values are distributed across buckets. The resulting shape reflects the spread of per-group summary values, not individual measurements.

**Note**: Because these two types aggregate data differently, switching between them can significantly change the shape of the histogram.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert to <div>-format alert for more visual styling?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


#### Percentile markers

With APM request distributions, you can add percentile markers on the x-axis.

{{< img src="dashboards/widgets/options/distribution_marker_controls.jpg" alt="Marker control preferences" style="width:80%;">}}

#### X-axis and Y-axis controls
#### X-axis and y-axis controls

Axis controls are available through the UI and the JSON editor.

Expand Down
Loading