prometheus-2.3.0: Prometheus Haskell Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Metrics.Prometheus.Metric.Counter

Synopsis

Documentation

newtype CounterSample Source #

Constructors

CounterSample 

Fields

Instances

Instances details
Show CounterSample Source # 
Instance details

Defined in System.Metrics.Prometheus.Metric.Counter

add :: Int -> Counter -> IO () Source #

inc :: Counter -> IO () Source #

set :: Int -> Counter -> IO () Source #

Write i to the counter, if i is more than the current value. This is useful for when the count is maintained by a separate system (e.g. GHC's GC counter).

WARNING: For multiple writers, the most recent one wins, which may not preserve the increasing property. If you have stronger requirements than this, please check with the maintainers. See https://github.com/bitnomial/prometheus/pull/44 for discussion.

close