Derivative

Derivative aggregation

/ Derivative, / Aggregation

Derivative aggregation #

A parent pipeline aggregation computing the difference between each bucket’s metric and the previous bucket’s — “how much did it change”. A time series says where you are; the derivative says which way and how fast you are moving, bucket by bucket. The first bucket has no predecessor and answers null.

"delta": { "derivative": { "buckets_path": "revenue" } }

How it works #

derivative is declared inside the multi-bucket aggregation it decorates (the parent style), next to the metric it consumes. After the buckets are built, the engine walks them in order and attaches current − previous to each bucket under the pipeline’s own name:

...