Sha256: 4b6c804d63f231b72a7f2e11d7bdeb554ef1ed4d5dc5086b75b7e32e373a7fd2
Contents?: true
Size: 670 Bytes
Versions: 8
Compression:
Stored size: 670 Bytes
Contents
require 'sidekiq/exception_handler' require 'getaround_utils/utils/deep_key_value' module GetaroundUtils; end module GetaroundUtils::Patches; end class GetaroundUtils::Patches::KeyValueSidekiqExceptions module ExceptionHandlerLogger def call(exception, ctx) payload = {} payload[:message] = exception.message payload[:exception] = exception.class.name payload[:backtrace] = exception.backtrace&.join("\n") payload[:sidekiq] = ctx Sidekiq.logger.warn(GetaroundUtils::Utils::DeepKeyValue.serialize(payload.compact)) end end def self.enable Sidekiq::ExceptionHandler::Logger.prepend ExceptionHandlerLogger end end
Version data entries
8 entries across 8 versions & 1 rubygems