| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Logging.Monitoring.Registry
Description
Described metrics and compatibility aliases backed by the Prometheus client.
Synopsis
- data Registry = Registry {
- underlying :: Registry
- descriptions :: IORef (Map Text (Text, Text))
- aliases :: IORef [(Text, Text, Double)]
- new :: IO Registry
- describe :: Registry -> Text -> Text -> Text -> IO ()
- counter :: Registry -> Text -> Text -> [(Text, Text)] -> IO Counter
- gauge :: Registry -> Text -> Text -> [(Text, Text)] -> IO Gauge
- sampledCounter :: Registry -> Text -> Text -> IO Gauge
- histogram :: Registry -> Text -> Text -> [Double] -> [(Text, Text)] -> IO Histogram
- alias :: Registry -> Text -> Text -> Double -> IO ()
- sample :: Registry -> IO ByteString
- scaleSample :: Double -> MetricSample -> MetricSample
Documentation
Constructors
| Registry | |
Fields
| |
sampledCounter :: Registry -> Text -> Text -> IO Gauge Source #
Absolute, possibly fractional counters (e.g. RTS CPU seconds). The client's incrementable Counter stores Int; sample these through a Gauge handle and publish their counter type. Callers supply monotonically increasing values.
alias :: Registry -> Text -> Text -> Double -> IO () Source #
Both names are rendered from exactly the same sample. Histogram aliases scale the sum and bucket boundaries together; counts remain unchanged.
scaleSample :: Double -> MetricSample -> MetricSample Source #