diff --git a/lib/honeybadger/plugins/karafka.rb b/lib/honeybadger/plugins/karafka.rb index fa66439c..8309c6f1 100644 --- a/lib/honeybadger/plugins/karafka.rb +++ b/lib/honeybadger/plugins/karafka.rb @@ -6,9 +6,9 @@ module Plugins requirement { defined?(::Karafka) && ::Karafka.respond_to?(:monitor) } execution do - ::Karafka.monitor.subscribe('error.occurred') do |event| + ::Karafka.monitor.subscribe("error.occurred") do |event| Honeybadger.notify(event[:error]) - Honeybadger.event('error.occurred', error: event[:error]) if config.load_plugin_insights?(:karafka) + Honeybadger.event("error.occurred.karafka", error: event[:error]) if config.load_plugin_insights?(:karafka) end if config.load_plugin_insights?(:karafka) @@ -19,10 +19,11 @@ module Plugins id: event.payload[:caller].id, topic: event.payload[:caller].messages.metadata.topic, messages_count: event.payload[:caller].messages.metadata.size, + processing_lag: event.payload[:caller].messages.metadata.processing_lag, partition: event.payload[:caller].messages.metadata.partition } - Honeybadger.event('consumer.consumed.karafka', context) + Honeybadger.event("consumer.consumed.karafka", context) end end end