packages feed

hasql-resource-pool-0.5.3.2: library/Hasql/Pool/Observer.hs

module Hasql.Pool.Observer
(   Observed(..)
,   ObserverAction
)
where

import Hasql.Pool.Prelude


-- |
-- Represents properties of an observed IO action associated with a pool item.
newtype Observed = Observed
    {   latency :: Rational
    } deriving (Show)


-- |
-- You can use this action to send observed attributes to your metrics backend like Prometheus.
type ObserverAction = Observed -> IO ()