Closed nathanleclaire closed 7 years ago
Thanks @nathanleclaire!
The non_block
parameter to the push
/enq
methods was introduced in Ruby 2.2 and isn't available in Ruby 2.1 and earlier.
Hi @jazzdan, I did some digging and it looks like we rely on non_block: true
to ensure that we don't slow down the application due to network I/O sending events to Honeycomb. (In fact, we even raise an error in Libhoney::Client#initialize
if we detect you're running Ruby below 2.2, probably for that reason. I'm slightly puzzled how you're managing to hit the SizedQueue#enq
error without hitting the version check first.)
What Ruby versions are your apps currently running? I'm sure you're already aware, but it looks like 2.1 is EOL (not even getting security patches any more). Is upgrading Ruby something that might be on your roadmap already?
Hey @samstokes,
I did some digging and it looks like we rely on non_block: true to ensure that we don't slow down the application due to network I/O sending events to Honeycomb.
Cool I suspected as much given the heavy I/O nature of the application.
I'm slightly puzzled how you're managing to hit the SizedQueue#enq error without hitting the version check first.)
Easy! I forked the gem and deleted the check to see what would happen 😂. When I got to the param error I figured it wasn't a good idea to continue, but I mentioned it off-hand to @nathanleclaire when I met up with him at Strange Loop.
What Ruby versions are your apps currently running? I'm sure you're already aware, but it looks like 2.1 is EOL (not even getting security patches any more). Is upgrading Ruby something that might be on your roadmap already?
We're running 2.1, but you're totally right. Luckily we can workaround this until the upgrade happens by using honeycombio/logstash-output-honeycomb_json_batch in the meantime.
Thanks again! Feel free to close. :)
Easy! I forked the gem and deleted the check to see what would happen :joy:.
Great, good to hear there's a reasonable explanation ;)
Glad you can use the logstash plugin as a workaround. I totally feel your pain wrt having production code running on an old Ruby version. I was stuck on 1.8.7 for longer than I care to admit :|
(I've also noted the Ruby version requirement in the README so at least people don't have to go source diving to discover it :|)
https://github.com/honeycombio/libhoney-rb/blob/master/lib/libhoney/transmission.rb#L32 has an issue with older / different versions of Ruby. cc @jazzdan for more details