Skip to content

Luabee/pickle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

my dogger, pickle

About

Instant StatsD in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published