-
Notifications
You must be signed in to change notification settings - Fork 21
Add sane default behavior for missing statsdKey #5
base: master
Are you sure you want to change the base?
Conversation
If we are going to pave a cowpath we should probably do a little better then this. We can change the var statsd = require('express-statsd');
var computeKey = require('express-statsd/compute-key');
statsd(req, res, {
statsdKey: computeKey(req, res)
}, cb) We can put the code you have for computing the key value in a We can then get rid of the middleware stuff. |
+1 on what jake said. No middleware stuff! |
4030092
to
b5ff038
Compare
the top level URI in addition to the method
This is failing on lynx not being available for node 0.8 |
I think this should be two libraries:
Also, let me mention my dislike for trying to provide a "sane" default for three reasons:
We may be able to provide some ok defaults based on express' |
The default is only for the top level URI, so # 2/3 won't apply. Re: # 1 it'll log the pathname and not the query params. |
What's the point of only logging the content within the first |
|
cc @Raynos @kumikoda @mlmorg
Updated based on Jake's feedback:
-Don't provide a middleware
-I opted to provide a sane default for when the user does not provide a statsdKey