summaryrefslogtreecommitdiff
path: root/config/initializers/backtrace_silencers.rb
blob: f3e01d2344820a560377510d2b402ca1b0420e85 (plain)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

Rails.backtrace_cleaner.remove_silencers!

# This allows us to see the proper caller of SQL calls in {development,test}.log
if (Rails.env.development? || Rails.env.test?) && Gitlab.ee?
  Rails.backtrace_cleaner.add_silencer { |line| %r(^ee/lib/gitlab/database/load_balancing).match?(line) }
end

Rails.backtrace_cleaner.add_silencer { |line| !Gitlab::APP_DIRS_PATTERN.match?(line) }