Safe Haskell | None |
---|---|
Language | Haskell2010 |
Datadog access for your App
Synopsis
- class HasDogStatsClient app where
- getDogStatsClient :: app -> Maybe StatsClient
- class HasDogStatsTags app where
- getDogStatsTags :: app -> [Tag]
- data StatsClient
- data Tag
- sendAppMetricWithTags :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env, ToMetricValue v) => Text -> [(Text, Text)] -> MetricType -> v -> m ()
- increment :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> m ()
- counter :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Int -> m ()
- gauge :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Double -> m ()
- histogram :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env, ToMetricValue n) => Text -> [(Text, Text)] -> n -> m ()
- histogramSince :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> UTCTime -> m ()
- histogramSinceMs :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> UTCTime -> m ()
- data DogStatsSettings = DogStatsSettings {}
- envParseDogStatsEnabled :: Parser Error Bool
- envParseDogStatsSettings :: Parser Error DogStatsSettings
- envParseDogStatsTags :: Parser Error [Tag]
- mkStatsClient :: MonadIO m => DogStatsSettings -> m StatsClient
- guage :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Double -> m ()
Reader environment interface
class HasDogStatsClient app where Source #
getDogStatsClient :: app -> Maybe StatsClient Source #
Instances
HasDogStatsClient site => HasDogStatsClient (HandlerData child site) Source # | |
Defined in Freckle.App.Datadog getDogStatsClient :: HandlerData child site -> Maybe StatsClient Source # |
class HasDogStatsTags app where Source #
getDogStatsTags :: app -> [Tag] Source #
Instances
HasDogStatsTags site => HasDogStatsTags (HandlerData child site) Source # | |
Defined in Freckle.App.Datadog getDogStatsTags :: HandlerData child site -> [Tag] Source # |
data StatsClient #
Note that Dummy is not the only constructor, just the only publicly available one.
Tags are a Datadog specific extension to StatsD. They allow you to tag a metric with a dimension that’s meaningful to you and slice and dice along that dimension in your graphs. 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.
Lower-level operations
sendAppMetricWithTags :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env, ToMetricValue v) => Text -> [(Text, Text)] -> MetricType -> v -> m () Source #
Higher-level operations
increment :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> m () Source #
counter :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Int -> m () Source #
gauge :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Double -> m () Source #
histogram :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env, ToMetricValue n) => Text -> [(Text, Text)] -> n -> m () Source #
histogramSince :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> UTCTime -> m () Source #
histogramSinceMs :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> UTCTime -> m () Source #
Reading settings at startup
data DogStatsSettings #
DogStatsSettings | |
|
Instances
HasBufferSize DogStatsSettings Int | |
Defined in Network.StatsD.Datadog | |
HasHost DogStatsSettings HostName | |
Defined in Network.StatsD.Datadog | |
HasMaxDelay DogStatsSettings Int | |
Defined in Network.StatsD.Datadog | |
HasPort DogStatsSettings Int | |
Defined in Network.StatsD.Datadog | |
HasOnException DogStatsSettings (SomeException -> Seq ByteString -> IO (Seq ByteString -> Seq ByteString)) | |
Defined in Network.StatsD.Datadog onException :: Lens' DogStatsSettings (SomeException -> Seq ByteString -> IO (Seq ByteString -> Seq ByteString)) # |
mkStatsClient :: MonadIO m => DogStatsSettings -> m StatsClient #
Create a stats client. Be sure to close it with finalizeStatsClient
in order to send any pending stats and close the underlying handle when done using it. Alternatively, use withDogStatsD
to finalize it automatically.
To be removed in next major bump
guage :: (MonadUnliftIO m, MonadReader env m, HasDogStatsClient env, HasDogStatsTags env) => Text -> [(Text, Text)] -> Double -> m () Source #
Deprecated: Use gauge instead
Deprecated typo version of gauge