calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Calamity.Metrics.Eff

Description

Effect for handling metrics

Synopsis

Documentation

data Counter Source #

A handle to a counter

data Gauge Source #

A handle to a gauge

data Histogram Source #

A handle to a histogram

data HistogramSample Source #

Constructors

HistogramSample 

Fields

Instances

Instances details
Show HistogramSample Source # 
Instance details

Defined in Calamity.Metrics.Eff

Default HistogramSample Source # 
Instance details

Defined in Calamity.Metrics.Eff

Eq HistogramSample Source # 
Instance details

Defined in Calamity.Metrics.Eff

TextShow HistogramSample Source # 
Instance details

Defined in Calamity.Metrics.Eff

(k ~ A_Lens, a ~ Map Double Double, b ~ Map Double Double) => LabelOptic "buckets" k HistogramSample HistogramSample a b Source # 
Instance details

Defined in Calamity.Metrics.Eff

(k ~ A_Lens, a ~ Int, b ~ Int) => LabelOptic "count" k HistogramSample HistogramSample a b Source # 
Instance details

Defined in Calamity.Metrics.Eff

(k ~ A_Lens, a ~ Double, b ~ Double) => LabelOptic "sum" k HistogramSample HistogramSample a b Source # 
Instance details

Defined in Calamity.Metrics.Eff

data MetricEff m a where Source #

Constructors

RegisterCounter

Register a Counter

Fields

RegisterGauge

Register a Gauge

Fields

RegisterHistogram

Register a Histogram

Fields

AddCounter :: Int -> Counter -> MetricEff m Int 
ModifyGauge :: (Double -> Double) -> Gauge -> MetricEff m Double 
ObserveHistogram :: Double -> Histogram -> MetricEff m HistogramSample 

registerCounter :: forall r. Member MetricEff r => Text -> [(Text, Text)] -> Sem r Counter Source #

Register a Counter

registerGauge :: forall r. Member MetricEff r => Text -> [(Text, Text)] -> Sem r Gauge Source #

Register a Gauge

registerHistogram :: forall r. Member MetricEff r => Text -> [(Text, Text)] -> [Double] -> Sem r Histogram Source #

Register a Histogram

addCounter :: forall r. Member MetricEff r => Int -> Counter -> Sem r Int Source #

modifyGauge :: forall r. Member MetricEff r => (Double -> Double) -> Gauge -> Sem r Double Source #