Safe Haskell | None |
---|---|
Language | Haskell2010 |
- withMonitor :: HasMonitorOptions t => t -> (Monitor -> IO a) -> IO a
- data Monitor = Monitor {}
- class HasMonitor t where
- monitor :: Lens' t Monitor
- _monitorOptions :: Lens' t MonitorOptions
- monitorServer :: Lens' t (Maybe Server)
- newtype Gauge = Gauge {}
- gauge :: (MonadIO m, HasMonitor t) => Text -> t -> m Gauge
- gaugeM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Gauge
- newtype Counter = Counter {
- runCounter :: Maybe Counter
- counter :: (MonadIO m, HasMonitor t) => Text -> t -> m Counter
- counterM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Counter
- newtype Label = Label {}
- label :: (MonadIO m, HasMonitor t) => Text -> t -> m Label
- labelM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Label
- data Server :: *
- withServer :: HasMonitor t => t -> (Server -> IO ()) -> IO ()
- forkServer :: ByteString -> Int -> IO Server
- module Ermine.Monitor.Combinators
- module Ermine.Monitor.Options
Documentation
withMonitor :: HasMonitorOptions t => t -> (Monitor -> IO a) -> IO a Source
The Monitor
Enable/disable EKG
class HasMonitor t where Source
monitor :: Lens' t Monitor Source
_monitorOptions :: Lens' t MonitorOptions Source
monitorServer :: Lens' t (Maybe Server) Source
Gauges
gauge :: (MonadIO m, HasMonitor t) => Text -> t -> m Gauge Source
gaugeM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Gauge Source
create a gauge
Counters
counter :: (MonadIO m, HasMonitor t) => Text -> t -> m Counter Source
counterM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Counter Source
create a counter
Labels
label :: (MonadIO m, HasMonitor t) => Text -> t -> m Label Source
labelM :: (MonadIO m, MonadReader t m, HasMonitor t) => Text -> m Label Source
create a label
Compatibilty with EKG
data Server :: *
withServer :: HasMonitor t => t -> (Server -> IO ()) -> IO () Source
forkServer :: ByteString -> Int -> IO Server
Modifiers
module Ermine.Monitor.Combinators
Options
module Ermine.Monitor.Options