Commit 5435cba3 authored by Stan Hu's avatar Stan Hu

Merge branch 'pl-perf-backtrace-silencer' into 'master'

Improve performance of Rails backtrace cleaner configuration

See merge request gitlab-org/gitlab!40182
parents 3c4e600b 60da7090
---
title: Improve performance of Rails backtrace cleaner configuration
merge_request: 40182
author:
type: performance
...@@ -2,7 +2,7 @@ Rails.backtrace_cleaner.remove_silencers! ...@@ -2,7 +2,7 @@ Rails.backtrace_cleaner.remove_silencers!
# This allows us to see the proper caller of SQL calls in {development,test}.log # This allows us to see the proper caller of SQL calls in {development,test}.log
if (Rails.env.development? || Rails.env.test?) && Gitlab.ee? if (Rails.env.development? || Rails.env.test?) && Gitlab.ee?
Rails.backtrace_cleaner.add_silencer { |line| line =~ %r(^ee/lib/gitlab/database/load_balancing) } Rails.backtrace_cleaner.add_silencer { |line| %r(^ee/lib/gitlab/database/load_balancing).match?(line) }
end end
Rails.backtrace_cleaner.add_silencer { |line| line !~ Gitlab::APP_DIRS_PATTERN } Rails.backtrace_cleaner.add_silencer { |line| !Gitlab::APP_DIRS_PATTERN.match?(line) }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment