datadog 0.2.3.0 → 0.2.4.0
raw patch · 4 files changed
+14/−9 lines, 4 files
Files
- datadog.cabal +6/−5
- src/Network/Datadog.hs +1/−1
- src/Network/Datadog/Internal.hs +1/−1
- src/Network/StatsD/Datadog.hs +6/−2
datadog.cabal view
@@ -1,14 +1,15 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.0.+-- This file has been generated from package.yaml by hpack version 0.31.1. -- -- see: https://github.com/sol/hpack ----- hash: 2c7b670048d1d09b538ce6bb32964fafec93971f0b144c73d13fca6c1e873591+-- hash: d6c6e90c9b2304ff251dafc6da8cebd89bea58bbf8d29ccfe06b46b459e6c81d name: datadog-version: 0.2.3.0+version: 0.2.4.0 synopsis: Datadog client for Haskell. Supports both the HTTP API and StatsD.+description: Datadog client for Haskell. Supports both the HTTP API and StatsD. category: Network homepage: https://github.com/iand675/datadog author: Ian Duncan@@ -35,7 +36,7 @@ hs-source-dirs: src default-extensions: ConstraintKinds DataKinds DeriveDataTypeable DeriveGeneric EmptyDataDecls FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NamedFieldPuns NoMonomorphismRestriction OverloadedStrings PackageImports PolyKinds QuasiQuotes RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators ViewPatterns- ghc-options: -Wall -fwarn-tabs -O2+ ghc-options: -Wall -fwarn-tabs build-depends: aeson , auto-update@@ -75,7 +76,7 @@ hs-source-dirs: test default-extensions: ConstraintKinds DataKinds DeriveDataTypeable DeriveGeneric EmptyDataDecls FlexibleContexts FlexibleInstances GADTs GeneralizedNewtypeDeriving LambdaCase MultiParamTypeClasses NamedFieldPuns NoMonomorphismRestriction OverloadedStrings PackageImports PolyKinds QuasiQuotes RankNTypes RecordWildCards ScopedTypeVariables StandaloneDeriving TemplateHaskell TupleSections TypeFamilies TypeOperators ViewPatterns- ghc-options: -Wall -fwarn-tabs -O2+ ghc-options: -Wall -fwarn-tabs build-depends: Cabal , aeson
src/Network/Datadog.hs view
@@ -51,7 +51,7 @@ -- | Create a new environment using authentication keys, defaulting to the -- Datadog documented default API URL. createEnvironment :: Keys -> IO Environment-createEnvironment keys = fmap (Environment keys "https://app.datadoghq.com/api/v1/") managerIO+createEnvironment keys = fmap (Environment keys "https://api.datadoghq.com/api/v1/") managerIO where managerIO = newManager tlsManagerSettings withDatadog :: DatadogCredentials k => k -> (DatadogClient k -> IO a) -> IO a
src/Network/Datadog/Internal.hs view
@@ -72,7 +72,7 @@ "\": " ++ e ++ ": " ++ unpack (decodeUtf8 body) baseRequest :: Request-baseRequest = fromJust $ parseUrlThrow "https://app.datadoghq.com"+baseRequest = fromJust $ parseUrlThrow "https://api.datadoghq.com" class DatadogCredentials s where signRequest :: s -> Request -> Request
src/Network/StatsD/Datadog.hs view
@@ -27,7 +27,7 @@ ServiceCheckStatus(..), ToStatsD, -- * Optional fields- Tag,+ Tag(fromTag), tag, ToMetricValue(..), value,@@ -63,6 +63,7 @@ import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as L import Data.BufferBuilder.Utf8+import Data.Function (on) import Data.List (intersperse) import qualified Data.Sequence as Seq import qualified Data.ByteString as B@@ -71,7 +72,7 @@ import qualified Data.Text as T import Data.Time.Clock import Data.Time.Clock.POSIX-import Data.Text.Encoding (encodeUtf8)+import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Network.Socket hiding (send, sendTo, recv, recvFrom) import System.IO ( BufferMode(BlockBuffering)@@ -102,6 +103,9 @@ -- For example, if you wanted to measure the performance of two video rendering algorithms, -- you could tag the rendering time metric with the version of the algorithm you used. newtype Tag = Tag { fromTag :: Utf8Builder () }++instance Show Tag where show = ("Tag " ++) . T.unpack . decodeUtf8 . runUtf8Builder . fromTag+instance Eq Tag where (==) = (==) `on` show -- | Create a tag from a key-value pair. Useful for slicing and dicing events in Datadog. --