-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Prometheus Haskell Client -- -- Idiomatic Haskell client for Prometheus.io monitoring. @package prometheus @version 0.1.0.3 module System.Metrics.Prometheus.Metric.Summary data SummarySample SummarySample :: Map Double Int -> Int -> Int -> SummarySample [sumQuantiles] :: SummarySample -> Map Double Int [sumSum] :: SummarySample -> Int [sumCount] :: SummarySample -> Int module System.Metrics.Prometheus.Metric.Histogram data Histogram data HistogramSample HistogramSample :: Buckets -> Double -> Int -> HistogramSample [histBuckets] :: HistogramSample -> Buckets [histSum] :: HistogramSample -> Double [histCount] :: HistogramSample -> Int type UpperBound = Double new :: [UpperBound] -> IO Histogram put :: Double -> Histogram -> IO () sample :: Histogram -> IO HistogramSample module System.Metrics.Prometheus.MetricId newtype Name Name :: Text -> Name [unName] :: Name -> Text newtype Labels Labels :: Map Text Text -> Labels [unLabels] :: Labels -> Map Text Text data MetricId MetricId :: Name -> Labels -> MetricId [name] :: MetricId -> Name [labels] :: MetricId -> Labels addLabel :: Text -> Text -> Labels -> Labels fromList :: [(Text, Text)] -> Labels instance GHC.Show.Show System.Metrics.Prometheus.MetricId.MetricId instance GHC.Classes.Ord System.Metrics.Prometheus.MetricId.MetricId instance GHC.Classes.Eq System.Metrics.Prometheus.MetricId.MetricId instance GHC.Base.Monoid System.Metrics.Prometheus.MetricId.Labels instance GHC.Classes.Ord System.Metrics.Prometheus.MetricId.Labels instance GHC.Classes.Eq System.Metrics.Prometheus.MetricId.Labels instance GHC.Show.Show System.Metrics.Prometheus.MetricId.Labels instance GHC.Base.Monoid System.Metrics.Prometheus.MetricId.Name instance Data.String.IsString System.Metrics.Prometheus.MetricId.Name instance GHC.Classes.Ord System.Metrics.Prometheus.MetricId.Name instance GHC.Classes.Eq System.Metrics.Prometheus.MetricId.Name instance GHC.Show.Show System.Metrics.Prometheus.MetricId.Name module System.Metrics.Prometheus.Metric.Gauge data Gauge newtype GaugeSample GaugeSample :: Double -> GaugeSample [unGaugeSample] :: GaugeSample -> Double new :: IO Gauge add :: Double -> Gauge -> IO () sub :: Double -> Gauge -> IO () inc :: Gauge -> IO () dec :: Gauge -> IO () set :: Double -> Gauge -> IO () sample :: Gauge -> IO GaugeSample module System.Metrics.Prometheus.Metric.Counter data Counter newtype CounterSample CounterSample :: Int -> CounterSample [unCounterSample] :: CounterSample -> Int new :: IO Counter add :: Int -> Counter -> IO () inc :: Counter -> IO () sample :: Counter -> IO CounterSample module System.Metrics.Prometheus.Metric data Metric CounterMetric :: Counter -> Metric GaugeMetric :: Gauge -> Metric -- | Summary S.Summary HistogramMetric :: Histogram -> Metric data MetricSample CounterMetricSample :: CounterSample -> MetricSample GaugeMetricSample :: GaugeSample -> MetricSample HistogramMetricSample :: HistogramSample -> MetricSample SummaryMetricSample :: SummarySample -> MetricSample metricSample :: (CounterSample -> a) -> (GaugeSample -> a) -> (HistogramSample -> a) -> (SummarySample -> a) -> MetricSample -> a module System.Metrics.Prometheus.Registry data Registry newtype RegistrySample RegistrySample :: Map MetricId MetricSample -> RegistrySample [unRegistrySample] :: RegistrySample -> Map MetricId MetricSample new :: Registry registerCounter :: Name -> Labels -> Registry -> IO (Counter, Registry) registerGauge :: Name -> Labels -> Registry -> IO (Gauge, Registry) registerHistogram :: Name -> Labels -> [UpperBound] -> Registry -> IO (Histogram, Registry) sample :: Registry -> IO RegistrySample instance GHC.Show.Show System.Metrics.Prometheus.Registry.KeyError instance GHC.Exception.Exception System.Metrics.Prometheus.Registry.KeyError module System.Metrics.Prometheus.GlobalRegistry data GlobalRegistry new :: IO GlobalRegistry registerCounter :: Name -> Labels -> GlobalRegistry -> IO Counter registerGauge :: Name -> Labels -> GlobalRegistry -> IO Gauge registerHistogram :: Name -> Labels -> [UpperBound] -> GlobalRegistry -> IO Histogram sample :: GlobalRegistry -> IO RegistrySample module System.Metrics.Prometheus.RegistryT newtype RegistryT m a RegistryT :: StateT Registry m a -> RegistryT m a [unRegistryT] :: RegistryT m a -> StateT Registry m a evalRegistryT :: Monad m => RegistryT m a -> m a execRegistryT :: Monad m => RegistryT m a -> m Registry runRegistryT :: Monad m => RegistryT m a -> m (a, Registry) withRegistry :: (Registry -> m (a, Registry)) -> RegistryT m a registerCounter :: Name -> Labels -> RegistryT IO Counter registerGauge :: Name -> Labels -> RegistryT IO Gauge registerHistogram :: Name -> Labels -> [UpperBound] -> RegistryT IO Histogram sample :: RegistryT IO RegistrySample instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (System.Metrics.Prometheus.RegistryT.RegistryT m) instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState System.Metrics.Prometheus.Registry.Registry (System.Metrics.Prometheus.RegistryT.RegistryT m) instance GHC.Base.Functor m => GHC.Base.Functor (System.Metrics.Prometheus.RegistryT.RegistryT m) instance GHC.Base.Monad m => GHC.Base.Applicative (System.Metrics.Prometheus.RegistryT.RegistryT m) instance Control.Monad.Trans.Class.MonadTrans System.Metrics.Prometheus.RegistryT.RegistryT instance GHC.Base.Monad m => GHC.Base.Monad (System.Metrics.Prometheus.RegistryT.RegistryT m) module System.Metrics.Prometheus.Encode.MetricId encodeHeader :: MetricId -> MetricSample -> Builder encodeMetricId :: MetricId -> Builder encodeLabels :: Labels -> Builder encodeName :: Name -> Builder textValue :: RealFloat f => f -> Text encodeDouble :: RealFloat f => f -> Builder encodeInt :: Int -> Builder escape :: Text -> Text newline :: Builder space :: Builder module System.Metrics.Prometheus.Encode.Histogram encodeHistogram :: MetricId -> HistogramSample -> Builder module System.Metrics.Prometheus.Encode encodeMetrics :: RegistrySample -> Builder serializeMetrics :: RegistrySample -> ByteString module System.Metrics.Prometheus.Http serveHttpTextMetrics :: Port -> GlobalRegistry -> IO () prometheusApp :: GlobalRegistry -> Application prometheusResponse :: (Response -> IO b) -> GlobalRegistry -> IO b