Distributions measure the statistical distribution of a set of values across one or more hosts. In this way, Distributions are like a “global” version of Histograms.
Because averages of percentile aggregations are not statistically valid, Distribution metrics work on the raw data across hosts. For each combination of tags, Datadog maintains a timeseries for
For example, a given host
Foo reports a metric with the values
[1,1,1,2,2,2,3,3], and another host
Bar reports the same metric with the values
[1,1,2] during a flush interval. Here, the
p50 (median) for
Foo is 2 and the
Bar is 1. Aggregating by the average value in this case would result in 1.5. In reality, the global
p50 (median) is the median of the combined set
[1,1,1,1,1,2,2,2,2,3,3]: 2. This is what Distribution would report.
Under this model, the total number of timeseries created is based on the set of
tag:values for tags applied to a metric. Since these aggregations are global in nature, by default, Datadog only applies custom metric-level tags to these metrics. This behavior can be modified if you need host-level tags as well.
|dog.distribution(…)||Track the statistical distribution of a set of values over one or more hosts.|
See the DogStatsD-specific documentation for code examples.
Additional helpful documentation, links, and articles: