The latest version of prometheus is 2.3.0-0.

prometheus

Version 0.4.0 revision 1 uploaded by HerbertValerioRiedel.

Package meta

Synopsis
Prometheus Haskell Client
Description
Prometheus Haskell Client

A simple and modern, type safe, idiomatic Haskell client for Prometheus monitoring. Specifically there is no use of unsafe IO or manual ByteString construction from lists of bytes. Batteries-included web server.

Usage Example
module Example where

import           Control.Monad.IO.Class                         (liftIO)
import           System.Metrics.Prometheus.Concurrent.Http      (serveHttpTextMetricsT)
import           System.Metrics.Prometheus.Concurrent.RegistryT
import           System.Metrics.Prometheus.Metric.Counter       (inc)
import           System.Metrics.Prometheus.MetricId

main :: IO ()
main = runRegistryT $ do
    -- Labels can be defined as lists or added to an empty label set
    connectSuccessGauge <- registerGauge "example_connections" (fromList [("login", "success")])
    connectFailureGauge <- registerGauge "example_connections" (addLabel "login" "failure" mempty)
    connectCounter <- registerCounter "example_connection_total" mempty
    latencyHistogram <- registerHistogram "example_round_trip_latency_ms" mempty [10, 20..100]

    liftIO $ inc connectCounter -- increment a counter

    -- [...] pass metric handles to the rest of the app

    serveHttpTextMetricsT 8080 ["metrics"] -- http://localhost:8080/metric server
Advanced Usage

A Registry and StateT-based RegistryT are available for unit testing or generating lists of `[IO a]` actions that can be sequenced and returned from pure code to be applied.

Author
Luke Hoersten
Bug reports
http://github.com/LukeHoersten/prometheus/issues
Category
Metrics, Monitoring, Web, System
Copyright
Bitnomial, Inc. (c) 2016
Homepage
http://github.com/LukeHoersten/prometheus#readme
Maintainer
luke@hoersten.org, opensource@bitnomial.com
Package URL
n/a
Stability
n/a

Components