Description
Instant StatsD in Haskell.
Description
Instant StatsD in Haskell. Easy to implement in a program you've already written without any refactoring to pass any sockets/configuration around.
README.md
pickle
Instant StatsD in Haskell. Easy to implement in a program you've already written without any refactoring to pass any sockets/configuration around.
Usage
Call setupPickle defaultConfig
at least once, e.g.
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Map.Strict as M
main :: IO()
main = do
setupPickle defaultConfig
{...}
Then to send metrics you can just call one of these functions:
let name = "gauge.name"
value = 42
tags = M.fromList [("key","value), ("tag2","value")]
gauge name value (Just tags)
timer name value (Just tags) Nothing
counter name value (Just tags) Nothing
Pickle will take care of the rest. He's a good boy.