msiebuhr/node-statsd-client — pull request #15 by addisonj (2012-10-13 19:26:58+00:00)
Title: add in suppport for timing each express route and make the middleware mo...

This pull request adds in support for enabling timing request by the express route.

It makes no change to api but uses the undocumented second parameter, an options hash.

metric names are put in the "reponse_time.by_url." bucket. Slashes are replaced with underscores and colons are stripped.

A special exception is made for "/" which is replaced with "root"

I also added a onResponseEnd option which is a function that takes the client, startTime, req and res objects that allows for more custom metrics.

Let me know if you have any issues