integrate(set[])

Given an arbitrary number of series, performs a numerical integration on each series to return a set of equal length. This is equivalent to computing the cumulative sum over the series, where each point in the returned series is the sum of the current point and the accumulated sum of all previous points in the series.

Example:

The following expression plots the sum of AWS.EC2.CPUCreditUsage and all previous values of AWS.EC2.CPUCreditUsage which display in a given time period. The series in the example includes the optional fields period and function, which if removed will default to the metric’s native period and a summary statistic of mean.

integrate(
  sum(s("AWS.EC2.CPUCreditUsage",
    {"name": "prodvpc*"},
    { period:"60", function:"sum" }
)))

The chart below demonstrates how the integration expression (provided above) starts at the actual value of the metric and continuously climbs at the rate of the next metric value provided.

integrate-example-1

You can see how the integrate stream continues to rise with each data point from the increase from AWS.EC2.CPUCreditUsage.