lib/deimos/instrumentation.rb in deimos-ruby-1.23.1.pre.beta3 vs lib/deimos/instrumentation.rb in deimos-ruby-1.23.1.pre.beta4
- old
+ new
@@ -47,10 +47,11 @@
# as a Deimos event.
# @param event [ActiveSupport::Notifications::Event]
# @return [void]
def self.send_produce_error(event)
exception = event.payload[:exception_object]
+ Rails.logger.info("Exception: #{exception}")
return unless exception
if exception.respond_to?(:failed_messages)
messages = exception.failed_messages
messages.group_by(&:topic).each do |topic, batch|
@@ -83,8 +84,9 @@
end
end
ActiveSupport::Notifications.subscribe('deliver_messages.producer.kafka') do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
+ Rails.logger.info(event.payload)
KafkaListener.send_produce_error(event)
end
end