Circonus Histogram datapoints allow you to store, visualize, and reason about high-velocity data. Sometimes, you also want to apply those histogram analytics to numeric data that is sampled at a low (1 sample/minute) frequency. With the following CAQL function, you now have the possibility to do so:


This function will aggregate the incoming stream of data for a time of `<duration>` and output a stream of histograms of the latest completed window.

Example: Latency histogram. The following graph was generated by
the following query:

     metric:average(<id>,<name>) | window:histogram(1h)

Of course, you can then apply other histogram methods, for further analysis:

    metric:average(<>,<>) | window:histogram(1h) | histogram:IQR()

Histogram Aggregation
When zooming to large view ranges of weeks or years, numeric data gets aggregated by mean values, which leads to peak erosion (cf. See our article Avoid Peak Erosion using Max-aggregation).

As histograms are naturally aggregated by summing the bin counts, we can use histogram synthesis for viewing numeric data at large view ranges:

    metric:average(<>,<>) | window:histogram(1)

Note, that the black histogram points, are much higher than the peaks of the original metric.