Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype RidleyT t a = Ridley (ReaderT RidleyOptions t a)
- type Ridley = RidleyT (RegistryT (KatipContextT IO))
- runRidley :: RidleyOptions -> LogEnv -> Ridley a -> IO a
- data RidleyCtx = RidleyCtx ThreadId (Maybe WaiMetrics)
- ridleyThreadId :: Lens' RidleyCtx ThreadId
- ridleyWaiMetrics :: Lens' RidleyCtx (Maybe WaiMetrics)
- type Port = Int
- type PrometheusOptions = AdapterOptions
- data RidleyMetric
- = ProcessMemory
- | CPULoad
- | GHCConc
- | Network
- | Wai
- | DiskUsage
- | CustomMetric !Text !(Maybe Int) (forall m. MonadIO m => RidleyOptions -> RegistryT m RidleyMetricHandler)
- data RidleyOptions
- data RidleyMetricHandler
- metric :: RidleyMetricHandler -> c
- updateMetric :: RidleyMetricHandler -> c -> Bool -> IO ()
- flush :: RidleyMetricHandler -> Bool
- label :: RidleyMetricHandler -> Text
- mkRidleyMetricHandler :: forall c. HasCallStack => Text -> c -> (c -> Bool -> IO ()) -> Bool -> RidleyMetricHandler
- defaultMetrics :: [RidleyMetric]
- newOptions :: [(Text, Text)] -> [RidleyMetric] -> RidleyOptions
- prometheusOptions :: Lens' RidleyOptions PrometheusOptions
- ridleyMetrics :: Lens' RidleyOptions (Set RidleyMetric)
- katipScribes :: Lens' RidleyOptions (Namespace, [(Text, Scribe)])
- katipSeverity :: Lens' RidleyOptions Severity
- dataRetentionPeriod :: Lens' RidleyOptions (Maybe NominalDiffTime)
- runHandler :: RidleyMetricHandler -> IO ()
Documentation
Ridley (ReaderT RidleyOptions t a) |
Instances
KatipContext Ridley Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types getKatipContext :: Ridley LogContexts # localKatipContext :: (LogContexts -> LogContexts) -> Ridley a -> Ridley a # getKatipNamespace :: Ridley Namespace # localKatipNamespace :: (Namespace -> Namespace) -> Ridley a -> Ridley a # | |
Katip Ridley Source # | |
MonadTrans RidleyT Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types | |
Monad t => MonadReader RidleyOptions (RidleyT t) Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types ask :: RidleyT t RidleyOptions # local :: (RidleyOptions -> RidleyOptions) -> RidleyT t a -> RidleyT t a # reader :: (RidleyOptions -> a) -> RidleyT t a # | |
Monad t => Monad (RidleyT t) Source # | |
Functor t => Functor (RidleyT t) Source # | |
Applicative t => Applicative (RidleyT t) Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types | |
MonadIO t => MonadIO (RidleyT t) Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types |
type PrometheusOptions = AdapterOptions Source #
data RidleyMetric Source #
ProcessMemory | |
CPULoad | |
GHCConc | Tap into the metrics exposed by GHC.Conc |
Network | |
Wai | |
DiskUsage | Gets stats about Disk usage (free space, etc) |
CustomMetric | |
|
Instances
Eq RidleyMetric Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types (==) :: RidleyMetric -> RidleyMetric -> Bool # (/=) :: RidleyMetric -> RidleyMetric -> Bool # | |
Ord RidleyMetric Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types compare :: RidleyMetric -> RidleyMetric -> Ordering # (<) :: RidleyMetric -> RidleyMetric -> Bool # (<=) :: RidleyMetric -> RidleyMetric -> Bool # (>) :: RidleyMetric -> RidleyMetric -> Bool # (>=) :: RidleyMetric -> RidleyMetric -> Bool # max :: RidleyMetric -> RidleyMetric -> RidleyMetric # min :: RidleyMetric -> RidleyMetric -> RidleyMetric # | |
Show RidleyMetric Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types showsPrec :: Int -> RidleyMetric -> ShowS # show :: RidleyMetric -> String # showList :: [RidleyMetric] -> ShowS # |
data RidleyOptions Source #
Instances
Monad t => MonadReader RidleyOptions (RidleyT t) Source # | |
Defined in System.Metrics.Prometheus.Ridley.Types ask :: RidleyT t RidleyOptions # local :: (RidleyOptions -> RidleyOptions) -> RidleyT t a -> RidleyT t a # reader :: (RidleyOptions -> a) -> RidleyT t a # |
data RidleyMetricHandler Source #
metric :: RidleyMetricHandler -> c Source #
An opaque metric
updateMetric :: RidleyMetricHandler -> c -> Bool -> IO () Source #
An IO action used to update the metric
flush :: RidleyMetricHandler -> Bool Source #
Whether or not to flush this Metric
label :: RidleyMetricHandler -> Text Source #
A user-friendly label, used to report errors
mkRidleyMetricHandler :: forall c. HasCallStack => Text -> c -> (c -> Bool -> IO ()) -> Bool -> RidleyMetricHandler Source #
newOptions :: [(Text, Text)] -> [RidleyMetric] -> RidleyOptions Source #
katipScribes :: Lens' RidleyOptions (Namespace, [(Text, Scribe)]) Source #
runHandler :: RidleyMetricHandler -> IO () Source #