A Distribution Summary is used to track the distribution of events. It is similar to a Timer, but more general, in that the size does not have to be a period of time. For example, a distribution summary could be used to measure the payload sizes of requests hitting a server.
It is recommended to always use base units when recording the data. So, if measuring the payload size use bytes, not kilobytes or some other unit. This allows the presentation layer for graphing to use either SI or IEC prefixes in a natural manner, and you do not need to consider the meaning of something like "milli-milliseconds".
Average Measurement (:dist-avg)¶
For Timer and Distribution Summary metrics, the
collected each time a measurement is taken. If this technique was applied to a request latency
metric, then you would have the average latency per request for an arbitrary grouping. These
types of metrics have an explicit count based on activity. To get an average per measurement
statistic,totalTime,:eq,:sum, statistic,count,:eq,:sum, :div
This expression can be bound to a query using the :cq (common query) operator:
statistic,totalTime,:eq,:sum, statistic,count,:eq,:sum, :div nf.cluster,foo,:eq,name,http.req.latency,:eq,:and,:cq
To make this process easier, Atlas provides a :dist-avg function that is used in the same manner as a built-in aggregate function:
Maximum Measurement (:dist-max)¶
Standard Deviation of Measurement (:dist-stddev)¶