prometheus 0.3.2.1 → 0.4.0
raw patch · 2 files changed
+13/−7 lines, 2 filesdep ~basedep ~transformers
Dependency ranges changed: base, transformers
Files
prometheus.cabal view
@@ -1,5 +1,5 @@ name: prometheus-version: 0.3.2.1+version: 0.4.0 synopsis: Prometheus Haskell Client homepage: http://github.com/LukeHoersten/prometheus#readme bug-reports: http://github.com/LukeHoersten/prometheus/issues@@ -74,12 +74,12 @@ , System.Metrics.Prometheus.RegistryT build-depends: atomic-primops >= 0.8 && < 0.9- , base >= 4.7 && < 5.0+ , base >= 4.7 && < 4.10 , bytestring >= 0.10 && < 0.11 , containers >= 0.5 && < 0.6 , http-types >= 0.9 && < 0.10 , text >= 1.2 && < 1.3- , transformers >= 0.4 && < 0.5+ , transformers >= 0.4 && < 0.6 , wai >= 3.2 && < 3.3 , warp >= 3.2 && < 3.3
src/System/Metrics/Prometheus/Concurrent/Http.hs view
@@ -1,6 +1,12 @@ {-# LANGUAGE OverloadedStrings #-} -module System.Metrics.Prometheus.Concurrent.Http where+module System.Metrics.Prometheus.Concurrent.Http+ ( Path+ , serveHttpTextMetrics+ , serveHttpTextMetricsT+ , prometheusApp+ )+ where import Control.Monad.IO.Class (MonadIO, liftIO)@@ -28,15 +34,15 @@ serveHttpTextMetrics :: MonadIO m => Port -> Path -> IO RegistrySample -> m ()-serveHttpTextMetrics port path = liftIO . run port . app path+serveHttpTextMetrics port path = liftIO . run port . prometheusApp path serveHttpTextMetricsT :: MonadIO m => Port -> Path -> RegistryT m () serveHttpTextMetricsT port path = liftIO . serveHttpTextMetrics port path =<< sample -app :: Path -> IO RegistrySample -> Application-app path runSample request respond+prometheusApp :: Path -> IO RegistrySample -> Application+prometheusApp path runSample request respond | isPrometheusRequest path request = respond =<< prometheusResponse <$> runSample | otherwise = respond response404 where