Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Tags = Map Text Text
- data StatsDConfig = StatsDConfig {
- statsdHost :: Text
- statsdPort :: Text
- statsdPrefix :: Text
- statsdTags :: Tags
- statsdVerbose :: Bool
- type MetricData a = (Show a, Real a)
- defaultConfig :: StatsDConfig
- withPickleDo :: StatsDConfig -> IO a -> IO a
- metric :: MetricData a => Text -> Text -> a -> Maybe Tags -> Maybe Float -> IO ()
- gauge :: MetricData a => Text -> a -> Maybe Tags -> IO ()
- counter :: MetricData a => Text -> a -> Maybe Tags -> Maybe Float -> IO ()
- timer :: MetricData a => Text -> a -> Maybe Tags -> Maybe Float -> IO ()
- showT :: Show a => a -> Text
Documentation
data StatsDConfig Source #
Configuration for the UDP connection used
StatsDConfig | |
|
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.