DataDog/dogapi-rb — pull request #16 by alq666 (2012-08-20 22:57:44+00:00)
Title: Don't use Socket.gethostname as it won't play nice with aliasing.

I'm not a rubyist; the suggested code is fair game.