Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0d0bd8b
Initial commit
iand675 Mar 13, 2017
d1321d3
Update README.md
iand675 Mar 13, 2017
e39126e
Add a yesod middleware as well
iand675 Mar 14, 2017
40bb03d
Don't take a Clock as an argument
iand675 Mar 14, 2017
2979f90
Only want route name, not route params
iand675 Mar 14, 2017
fafd6ee
Don't use typeable for route name determination since it always retur…
iand675 Mar 14, 2017
93f3be3
Prevent warnings about non-existent `README.md` files.
steshaw Apr 3, 2017
d74de43
Merge pull request #1 from steshaw/master
iand675 Jun 2, 2017
ffdfae6
Rename directories to match package names
iand675 Aug 24, 2017
2f21031
Initial stab at basic APM support
iand675 Apr 19, 2018
cc2b208
Add in a smidge more type safety to APM
iand675 Apr 20, 2018
cea88fd
Move to unliftio in APM for yesod compatibility
iand675 Apr 28, 2018
0811e49
Improved APM support
iand675 Apr 28, 2018
a73093b
Add a no-trace transformer in order to enable turning of tracing at c…
iand675 May 1, 2018
de68bef
Forgot the no-trace instance
iand675 May 1, 2018
fb1a20d
Woops, wrong method name
iand675 May 1, 2018
bc7d175
Need a constraint for NoTraceT
iand675 May 1, 2018
a3b25ce
Update for APMClient
iand675 May 1, 2018
55b554b
Move trace handling to reaper thread
iand675 May 1, 2018
a41b6a2
Add pluggable exception handling for APM
iand675 May 16, 2018
cea84b4
Add MonadTrans instance for NoTraceT
iand675 Jun 4, 2018
8a0dcd2
Work on APM documentation
iand675 Jun 20, 2018
25845a7
Expose traceStack
iand675 Jun 20, 2018
49f4e65
Add unliftio to extra deps to see if it'll fix earlier resolver builds
iand675 Jun 20, 2018
821321c
Merge branch 'overly-long-packets' into apm
iand675 Jun 21, 2018
d1e438a
Move datadog into child dir to make room for associated projects
iand675 Jun 21, 2018
e68d3f9
Remove stack.yaml for dd middleware
iand675 Jun 21, 2018
8e6d8e9
Merge branch 'middleware' into apm
iand675 Jun 21, 2018
58ca131
Also set up buildkite for faster feedback
iand675 Jun 21, 2018
02afa6a
Fix test dependency for dd-wai-middleware
iand675 Jun 21, 2018
b70acc9
Try to not let buildkite be so freaky
iand675 Jun 21, 2018
3015d31
Merge branch 'master' into apm
iand675 Dec 27, 2018
f4d728d
Add MonadFail instance to NoTraceT
iand675 Dec 27, 2018
443e410
Merge remote-tracking branch 'origin/master' into apm
iand675 Feb 11, 2019
fbc94c1
Add simple monadic interface for stats tracking
iand675 Feb 11, 2019
6fcc7c0
Add several instances for MetricName
iand675 Feb 26, 2019
8df1c2d
Add trivial HasStatsClient instance
iand675 Feb 26, 2019
afa607c
Add MonadTrace instance for ResourceT
iand675 Feb 27, 2019
1290c1a
Try to get stack weirdness fixed
iand675 Nov 19, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
steps:
# Default stack.yaml
- command: "stack $ARGS build --test --no-run-tests"
# LTS 7
- command: "stack $ARGS build --test --no-run-tests"
env:
STACK_YAML: "stack-lts7.yaml"
# LTS 9
- command: "stack $ARGS build --test --no-run-tests"
env:
STACK_YAML: "stack-lts9.yaml"
# Latest LTS
- command: "stack $ARGS build --test --no-run-tests"
env:
ARGS: "--resolver lts"
# Nightly build
- command: "stack $ARGS build --test --no-run-tests"
env:
ARGS: "--resolver nightly"

- wait

- command: "stack $ARGS test"
- command: "stack $ARGS haddock"

- command: "stack $ARGS test"
env:
STACK_YAML: "stack-lts7.yaml"

- command: "stack $ARGS test"
env:
STACK_YAML: "stack-lts9.yaml"


- command: "stack $ARGS test"
env:
ARGS: "--resolver lts"

- command: "stack $ARGS test"
env:
ARGS: "--resolver nightly"
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
[![Build Status](https://travis-ci.org/iand675/datadog.svg?branch=master)](https://travis-ci.org/iand675/datadog.svg?branch=master)
### :zap: WAI middleware for tracking metrics in Datadog :dog2: :zap:

dd-middleware provides a simple middleware for shoving metrics from WAI
requests to Datadog. Out of the box, it times all request/response
lifecycles that don't throw exceptions (excluding raw responses used in
Websocket upgrades and the like).

The default tracked metric is `warp.requests.duration`

Additional metrics can be sent as part of the request lifecycle by
grabbing the datadog client from the WAI vault:

``` haskell
{-# LANGUAGE OverloadedStrings #-}
import Data.Foldable
import qualified Data.Vault.Lazy as V
import Network.StatsD.Datadog

anApp :: Application
anApp req responder = do
forM_ (V.lookup statsClientKey $ vault req) $ \client ->
send client $ metric (MetricName "aardvark") Counter (1 :: Int)
responder $ responseLBS "aardvark"
```




# Datadog Client
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions datadog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[![Build Status](https://travis-ci.org/iand675/datadog.svg?branch=master)](https://travis-ci.org/iand675/datadog.svg?branch=master)

# Datadog Client
File renamed without changes.
11 changes: 9 additions & 2 deletions package.yaml → datadog/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,30 @@ ghc-options:

dependencies:
- aeson
- atomic-primops
- auto-update
- base >= 4.7 && < 5
- buffer-builder
- bytestring
- containers
- clock
- conduit
- conduit-extra
- dlist
- exceptions
- http-client
- http-client-tls
- http-types
- lens
- lifted-base
- monad-control
- resourcet
- mtl
- mwc-random
- network
- old-locale
- text
- time
- transformers-base
- unliftio
- unordered-containers
- unliftio
- vector
Expand Down
File renamed without changes.
Loading