reinh / statsd

A Ruby Statsd client that isn't a direct port of the Python example code. Because Ruby isn't Python.
MIT License
411 stars 154 forks source link

Allow setting the host and port on a Statsd::Batch object #33

Closed mzsanford closed 11 years ago

mzsanford commented 11 years ago

I have some code that configured Statsd programmatically. In order to use Statsd::Batch as a drop-in replacement (config-wise) it needs to support the host and port setters so I added them in the attached pull request.

raggi commented 11 years ago

So you're using batching without well defined flush boundaries? That's an interesting approach.

mzsanford commented 11 years ago

The batch size is set by the application code (which best understands that) but the host and port configuration varies. It's defaulted in the app and then our configuration is actually Ruby code which configures things per-environment (similar to Rails). We needed to set the host in production and found it didn't work after an application added batching.