diff --git a/lib/rollbar/notifier.rb b/lib/rollbar/notifier.rb index c6253c46..d354271e 100644 --- a/lib/rollbar/notifier.rb +++ b/lib/rollbar/notifier.rb @@ -901,9 +901,12 @@ def log_instance_link(data) return unless data[:uuid] uuid_url = Util.uuid_rollbar_url(data, configuration) - log_info( - "[Rollbar] Details: #{uuid_url} (only available if report was successful)" - ) + info_message = "[Rollbar] Details: #{uuid_url} (only available if report was successful)" + if configuration.use_async && configuration.async_handler + async_handler = configuration.async_handler.class == Class ? configuration.async_handler : configuration.async_handler.class + info_message += ". With async handler = #{async_handler}" + end + log_info(info_message) end def via_failsafe?(item) diff --git a/spec/rollbar_spec.rb b/spec/rollbar_spec.rb index 6f84fe7a..363acaf5 100644 --- a/spec/rollbar_spec.rb +++ b/spec/rollbar_spec.rb @@ -1813,6 +1813,16 @@ def backtrace Rollbar.configure(&:use_sucker_punch) Rollbar.error(exception) end + + it "shows 'Rollbar::Delay::SuckerPunch' on the log" do + Rollbar.configure do |config| + config.use_sucker_punch + config.transmit = false + end + + expect(Rollbar.notifier).to receive(:log_info).with(/With async handler = Rollbar::Delay::SuckerPunch/) + Rollbar.notifier.info('info', 'foo bar') + end end describe '#use_shoryuken', :if => defined?(Shoryuken) do @@ -1823,6 +1833,16 @@ def backtrace Rollbar.configure(&:use_shoryuken) Rollbar.error(exception) end + + it "shows 'Rollbar::Delay::Shoryuken' on the log" do + Rollbar.configure do |config| + config.use_shoryuken + config.transmit = false + end + + expect(Rollbar.notifier).to receive(:log_info).with(/With async handler = Rollbar::Delay::Shoryuken/) + Rollbar.notifier.info('info', 'foo bar') + end end describe '#use_sidekiq', :if => defined?(Sidekiq) do @@ -1843,6 +1863,16 @@ def backtrace Rollbar.error(exception) end + + it "shows 'Rollbar::Delay::Sidekiq' on the log" do + Rollbar.configure do |config| + config.use_sidekiq + config.transmit = false + end + + expect(Rollbar.notifier).to receive(:log_info).with(/With async handler = Rollbar::Delay::Sidekiq/) + Rollbar.notifier.info('info', 'foo bar') + end end describe '#use_thread' do @@ -1878,6 +1908,16 @@ def backtrace expect(thread.priority).to eq(custom_priority) thread.join end + + it "shows 'Rollbar::Delay::Thread' on the log" do + Rollbar.configure do |config| + config.use_thread + config.transmit = false + end + + expect(Rollbar.notifier).to receive(:log_info).with(/With async handler = Rollbar::Delay::Thread/) + Rollbar.notifier.info('info', 'foo bar') + end end end