| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
System.Metrics.Prometheus.Metric.Counter
Documentation
newtype CounterSample Source #
Constructors
| CounterSample | |
Fields | |
Instances
| Show CounterSample Source # | |
Defined in System.Metrics.Prometheus.Metric.Counter Methods showsPrec :: Int -> CounterSample -> ShowS # show :: CounterSample -> String # showList :: [CounterSample] -> ShowS # | |
addAndSample :: Int -> Counter -> IO CounterSample 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.