Skip to content

MetricDimensionHandler

MetricDimensionHandler = (event, dimension, ctx) => Promise<ReadItem | undefined>

Defined in: builder/metric.ts:37

Maps the given metric event to a dimension - where the result is an item instance of the dimension type. For example, if a metric had the dimension “template:country”, this would interogate the event and return the “Australia” or “New Zealand” item.

If the handler cannot determine the dimension for an event, it should not error, but instead return undefined.

AlpyneEvent

DimensionInstance

ReadRuntimeInstance

Promise<ReadItem | undefined>