bvandenbos / statsd-client Goto Github PK
View Code? Open in Web Editor NEWRuby client for statsd.
Ruby client for statsd.
gem install statsd-client
requires rubygems >= 1.3.6, but there doesn't seem to be a reason for that dependency. This prevents people running Ubuntu 10.04 lucid from installing the gem without a --force.
The DNS service is queried once per sent packet if the supplied host is a hostname and not an IP address.
Ideally, the hostname is resolved only once (ever, or per configurable X seconds) and the resulting IP address is what's used in sending the UDP packet.
Now that I think of it, I believe (though untested) that if the DNS service is down or slow, the sending of the UDP packet in the current code will block while the resolving library tries to resolve the hostname to an IP address - so the whole benefit of UDP being fire-and-forget is overshadowed by the blocking DNS operation before the sending.
Ideally, DNS resolution (wherever it's done - by statsd-client or lower) is done with an appropriate, configurable timeout - and not done too often.
While using the gem to set up statsd for our rails client app I noticed the Statsd.time block method does not exist.
Looking into your code it seems like the documentation is out of sync with the code. The Statsd.timing method can receive a block and do this. Is there any reason the documentation and code are out of sync? is it planned to create the time method or is the use of the timing method the proper use?
Hi,
What license is this gem released under? Would it be possible for you to add a LICENSE file or add a license to the README?
Thanks
Gavin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.