Class: Honeybadger::Karafka::ErrorsListener
- Inherits:
-
Object
- Object
- Honeybadger::Karafka::ErrorsListener
- Defined in:
- lib/honeybadger/karafka.rb
Instance Method Summary collapse
-
#on_error_occurred(event) ⇒ Object
Sends error details to Honeybadger.
Instance Method Details
#on_error_occurred(event) ⇒ Object
Sends error details to Honeybadger
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/honeybadger/karafka.rb', line 9 def on_error_occurred(event) context = { type: event[:type] } = ["type:#{event[:type]}"] if (consumer = event.payload[:caller]).respond_to?(:messages) = consumer. = . consumer_group_id = consumer.topic.consumer_group.id context[:topic] = .topic context[:partition] = .partition context[:consumer_group] = consumer_group_id end Honeybadger.notify(event[:error], context: context) end |