middleware for dogstatsd