lib/honeybadger/plugins/karafka.rb in honeybadger-5.15.5 vs lib/honeybadger/plugins/karafka.rb in honeybadger-5.15.6
- old
+ new
@@ -1,10 +1,10 @@
require 'honeybadger/plugin'
module Honeybadger
module Plugins
Plugin.register :karafka do
- requirement { defined?(::Karafka) }
+ requirement { defined?(::Karafka) && ::Karafka.respond_to?(:monitor) }
execution do
::Karafka.monitor.subscribe('error.occurred') do |event|
Honeybadger.notify(event[:error])
Honeybadger.event('error.occurred', error: event[:error]) if config.load_plugin_insights?(:karafka)