Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MetricsScrapingConfig = MetricsScrapingConfig {}
- prometheusPort :: Iso' MetricsScrapingConfig Int
- data MetricsState = MetricsState {
- _metricsRegistry :: Registry
- _metricsCounters :: MVar (MetricsMap Counter)
- _metricsHistograms :: MVar (MetricsMap Histogram)
- metricsRegistry :: Lens' MetricsState Registry
- metricsCounters :: Lens' MetricsState (MVar (MetricsMap Counter))
- metricsHistograms :: Lens' MetricsState (MVar (MetricsMap Histogram))
- data PrometheusEnv = PrometheusEnv {}
- envMetricsState :: Lens' PrometheusEnv MetricsState
- envMetricsScrapingConfig :: Lens' PrometheusEnv MetricsScrapingConfig
- emptyState :: IO MetricsState
- forkMetricsServer :: MonadIO m => PrometheusEnv -> m ThreadId
- mkPrometheusMetricId :: MetricIdentifier -> MetricId
- metricIdStorable :: MetricIdentifier -> (Text, Labels)
- countToIdentifier :: CountName -> MetricIdentifier
- histogramToIdentifier :: HistogramName -> MetricIdentifier
- evalWithMetrics :: Member (Embed IO) r => Member (Reader (Maybe PrometheusEnv)) r => Sem (Metrics ': r) a -> Sem r a
- evalNothing :: Sem (Metrics ': r) a -> Sem r a
- evalMetrics :: Member (Embed IO) r => MetricsState -> Sem (Metrics ': r) a -> Sem r a
Documentation
prometheusPort :: Iso' MetricsScrapingConfig Int Source #
data MetricsState Source #
MetricsState | |
|
metricsRegistry :: Lens' MetricsState Registry Source #
metricsCounters :: Lens' MetricsState (MVar (MetricsMap Counter)) Source #
metricsHistograms :: Lens' MetricsState (MVar (MetricsMap Histogram)) Source #
data PrometheusEnv Source #
envMetricsState :: Lens' PrometheusEnv MetricsState Source #
forkMetricsServer :: MonadIO m => PrometheusEnv -> m ThreadId Source #
mkPrometheusMetricId :: MetricIdentifier -> MetricId Source #
Prometheus registry index key
metricIdStorable :: MetricIdentifier -> (Text, Labels) Source #
Index key for storing metrics
countToIdentifier :: CountName -> MetricIdentifier Source #
histogramToIdentifier :: HistogramName -> MetricIdentifier Source #
evalWithMetrics :: Member (Embed IO) r => Member (Reader (Maybe PrometheusEnv)) r => Sem (Metrics ': r) a -> Sem r a Source #
evalNothing :: Sem (Metrics ': r) a -> Sem r a Source #
evalMetrics :: Member (Embed IO) r => MetricsState -> Sem (Metrics ': r) a -> Sem r a Source #
Increments existing count, if it doesn't exist, creates a new | counter and increments it.