statsd-datadog-0.2.0.0: DataDog-flavored StatsD client.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Network.StatsD.Tags

Synopsis

Documentation

type Tags = [(Text, Text)] Source

tagged :: (Tagged a, ToTag t) => a -> [t] -> a Source

Add tags (with or without values). Due to OverloadedStrings instances interference you have to pin types using pack or ::.

counter_ "pings" `tagged` [ T.pack "success", "icmp" :: Text, "default" ]
                 `tagged` [ (T.pack "valued", "42" :: Text), ("it", "works") ]

class Tagged a where Source

Methods

getTags :: a -> Tags Source

setTags :: a -> Tags -> a Source

class ToTag a where Source

Methods

toTag :: a -> (Text, Text) Source

Instances