pickle-0.1.0.0: Instant StatsD in Haskell

Safe HaskellNone
LanguageHaskell2010

Data.Pickle

Synopsis

Documentation

type Tags = Map Text Text Source #

Tags for DogStatsD

data StatsDConfig Source #

Configuration for the UDP connection used

Constructors

StatsDConfig 

Fields

type MetricData a = (Show a, Real a) Source #

Something that can be sent as a metric.

defaultConfig :: StatsDConfig Source #

Default config used for StatsD UDP connection ()

withPickleDo :: StatsDConfig -> IO a -> IO a Source #

Start up our statsd client. This can and should be attached directly to main: > main = withPickleDo defaultConfig $ do (...)

This function can be nested, but one thread in your program at a time should be the "owner" of the pickle stack. Other threads can use the active pickle, but they shouldn't call this function since it changes settings for all threads.

metric Source #

Arguments

:: MetricData a 
=> Text

metric kind in character form (g,c,ms,s)

-> Text

metric name

-> a

metric value

-> Maybe Tags

Tags for metric

-> Maybe Float

Sampling rate for applicable metrics.

-> IO () 

Send a metric. Parses the options together.

gauge :: MetricData a => Text -> a -> Maybe Tags -> IO () Source #

Send a gauge.

counter :: MetricData a => Text -> a -> Maybe Tags -> Maybe Float -> IO () Source #

Send a counter.

timer :: MetricData a => Text -> a -> Maybe Tags -> Maybe Float -> IO () Source #

Send a timer.

showT :: Show a => a -> Text Source #

Internal utility to show something as Text