node-statsd
node-statsd copied to clipboard
intercept send out metrics
Hey,
I would like to intercept the outgoing metrics and for example prevent some of them to be really send. What do you think, would it be ok to directly intercept the internal send function or is that function rather unstable and might change over time ?
My use case is the following: I would like to write a hapi plugin that exposes the statsd client and automatically tracks route calls and timings, but also gives the user the possibility to send custom metrics. Now these statsd metrics could be send to aws cloudwatch and i would like to be able to limit the amount of different metrics that are send out.
So should I just intercept send or would it be possible to add some interception api ? I would like to prepare a PR if you are interested into that ?