We should add a Metrics effect to the SDK. This effect should be able to update counts (number of times a message type appears) and the amount of time an action takes. Additionally, we would want to be able to log metrics (similar to console logging):
data Metrics m a where
-- | Increments the count of a specific message
IncCount :: CountName -> Metrics m ()
-- | Times an action
WithTimer :: m a -> Metrics m (a, NominalDiffTime)
UPDATE: metrics won't have logging. Interpreter will be responsible for taking summands to a prometheus. Other summands should be added to support this interface (i.e., getCount, observeHistogram, getHistogram).
We should add a
Metrics
effect to the SDK. This effect should be able to update counts (number of times a message type appears) and the amount of time an action takes. Additionally, we would want to be able to log metrics (similar to console logging):UPDATE: metrics won't have logging. Interpreter will be responsible for taking summands to a prometheus. Other summands should be added to support this interface (i.e.,
getCount
,observeHistogram
,getHistogram
).