debian-mirror-gitlab/lib/gitlab/sidekiq_middleware/arguments_logger.rb
2023-07-07 10:43:13 +05:30

15 lines
406 B
Ruby

# frozen_string_literal: true
module Gitlab
module SidekiqMiddleware
class ArgumentsLogger
include Sidekiq::ServerMiddleware
def call(worker, job, queue)
loggable_args = Gitlab::ErrorTracking::Processor::SidekiqProcessor.loggable_arguments(job['args'], job['class'])
logger.info "arguments: #{Gitlab::Json.dump(loggable_args)}"
yield
end
end
end
end