lib/sidekiq/logging/shared.rb in sidekiq-logstash-3.2.0 vs lib/sidekiq/logging/shared.rb in sidekiq-logstash-3.2.1

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -require 'sidekiq/exception_utils' +require 'sidekiq/logging/exception_utils' module Sidekiq module Logging # Shared module with all the logics used by job loggers. module Shared @@ -52,11 +52,11 @@ payload['message'] += ": fail: #{payload['duration']} sec" payload['job_status'] = 'fail' config = Sidekiq::Logstash.configuration if config.log_job_exception_with_causes - payload['error'] = ExceptionUtils.get_exception_with_cause_hash( + payload['error'] = Sidekiq::Logging::ExceptionUtils.get_exception_with_cause_hash( exc, max_depth_left: config.causes_logging_max_depth ) else exc = exc.cause || exc if exc.is_a? Sidekiq::JobRetry::Handled payload['error_message'] = exc.message @@ -64,10 +64,10 @@ payload['error_backtrace'] = %('#{exc.backtrace.join("\n")}') if (cause = exc.cause) payload['error_cause'] = { 'class' => cause.class.to_s, 'message' => cause.message, - 'backtrace' => ExceptionUtils.backtrace_for(cause, exc.backtrace) + 'backtrace' => Sidekiq::Logging::ExceptionUtils.backtrace_for(cause, exc.backtrace) } end end process_payload(payload)