add back datadog "requests"

This commit is contained in:
Morgan Bazalgette 2017-04-13 09:23:46 +02:00
parent cc90105130
commit b2c3ada7c0
No known key found for this signature in database
GPG Key ID: 40D328300D245DA5
2 changed files with 2 additions and 3 deletions

View File

@ -56,6 +56,8 @@ func wrap(handle fasthttp.RequestHandler) fasthttp.RequestHandler {
return func(c *fasthttp.RequestCtx) { return func(c *fasthttp.RequestCtx) {
start := time.Now() start := time.Now()
doggo.Incr("requests", nil, 1)
defer func() { defer func() {
if rval := recover(); rval != nil { if rval := recover(); rval != nil {
var err error var err error

View File

@ -52,9 +52,6 @@ func Start(conf common.Conf, dbO *sqlx.DB) *fhr.Router {
fmt.Println(err) fmt.Println(err)
} }
doggo.Namespace = "api." doggo.Namespace = "api."
// r.Use(func(c *gin.Context) {
// doggo.Incr("requests", nil, 1)
// })
// redis // redis
red = redis.NewClient(&redis.Options{ red = redis.NewClient(&redis.Options{