kissmetrics/kmts — pull request #10 by pranas (2014-04-24 17:38:47+00:00)
Title: Set Net::HTTP open_timeout and read_timeout

We've been experiencing network issues when connecting to KissMetrics. Metrics are not important enough to bring the whole application down. This change let us to set Net::HTTP timeouts and kill requests taking too long.

This is how we solved our problem and I'd like to see the change in the official gem. A few things to discuss:
1) We use timeout of 3 seconds, it might be too harsh default for some users?
2) Maybe we should allow to customise both open_timeout and read_timeout separately? Or maybe we should put the whole Net::HTTP code in Timeout::Timeout block and set a single timeout instead of open_timeout and read_timeout

Let me know what you think and I'll update my PR accordingly.