MetricCalculationHandler
MetricCalculationHandler = (
event) =>number|null
Computes the numeric value one Event contributes to a Metric.
Parameters
Section titled “Parameters”Event being projected.
Returns
Section titled “Returns”number | null
The Event’s value, or null to exclude it.
Remarks
Section titled “Remarks”Without a handler every Event contributes 1, so the Metric counts its Events. A handler can
return another number, such as a duration or an amount carried in the payload, or null to
leave the Event out of the projection.

