| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Logging.Monitoring
Description
Prometheus exposition and trace-driven accounting. Counters describe this process; state gauges are sampled independently of the processing queue.
Synopsis
- withMonitoring :: IsTx tx => Maybe PortNumber -> Tracer IO (HydraLog tx) -> (Tracer IO (HydraLog tx) -> IO a) -> IO a
- withMonitoringForBackend :: IsTx tx => Text -> Maybe PortNumber -> Tracer IO (HydraLog tx) -> (Tracer IO (HydraLog tx) -> IO a) -> IO a
- prepareRegistry :: forall tx. IsTx tx => Text -> IO (HydraLog tx -> IO (), Registry, IO ())
- isMetricSample :: HydraLog tx -> Bool
Documentation
withMonitoring :: IsTx tx => Maybe PortNumber -> Tracer IO (HydraLog tx) -> (Tracer IO (HydraLog tx) -> IO a) -> IO a Source #
withMonitoringForBackend :: IsTx tx => Text -> Maybe PortNumber -> Tracer IO (HydraLog tx) -> (Tracer IO (HydraLog tx) -> IO a) -> IO a Source #
prepareRegistry :: forall tx. IsTx tx => Text -> IO (HydraLog tx -> IO (), Registry, IO ()) Source #
The refresh action expires unused timers even when no messages arrive.
isMetricSample :: HydraLog tx -> Bool Source #
Samples bypass the JSON queue in production, so a blocked log output does not freeze the health workers.