uber-archive / node-statsd-client

Node.js client for statsd
ISC License
28 stars 9 forks source link

implement isDisabled for statsd #21

Closed Raynos closed 9 years ago

Raynos commented 9 years ago

This allows you to pass a predicate function that disableds Statsd at runtime.

This will work cleanly if you have a runtime remote configuration service.

cc @sh1mmer

lxe commented 9 years ago

Why is it isDisabled() at config time? Why not disable() and enable() at run time? or does this just check whether it's disabled or not?

sh1mmer commented 9 years ago

This will used with zero-config getRemote which means that dynamically updating config will keep this property up to date.

Raynos commented 9 years ago

@lxe because a mutable stateful interface is made of bullshit

sh1mmer commented 9 years ago

other than above lgtm.