rollbar-gem
rollbar-gem copied to clipboard
Add option to bound thread queue?
In Rollbar::Delay::Thread
, it doesn't look like the thread queue is bounded.
This could pose a problem if the app starts logging exceptions at high volume in a loop?
What do you think of an adding an option like this?
--- lib/rollbar/delay/thread.rb
+++ lib/rollbar/delay/thread.rb
@@ -16,6 +16,11 @@ module Rollbar
attr_reader :reaper
def call(payload)
+ if option[:max_queue] && threads.length > options[:max_queue]
+ # enforce a bounded thread queue
+ return
+ end
Configured like this:
config.use_thread(max_queue: 5)