Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 764 Bytes

README.md

File metadata and controls

27 lines (23 loc) · 764 Bytes

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