summaryrefslogtreecommitdiff
path: root/config/initializers/bullet.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/bullet.rb')
-rw-r--r--config/initializers/bullet.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/config/initializers/bullet.rb b/config/initializers/bullet.rb
index 2d21514b121..3ef426aaadc 100644
--- a/config/initializers/bullet.rb
+++ b/config/initializers/bullet.rb
@@ -1,18 +1,18 @@
# frozen_string_literal: true
-def bullet_enabled?
- Gitlab::Utils.to_boolean(ENV['ENABLE_BULLET'].to_s)
-end
-
-if defined?(Bullet) && (bullet_enabled? || Rails.env.development?)
+if Gitlab::Bullet.configure_bullet?
Rails.application.configure do
config.after_initialize do
Bullet.enable = true
- Bullet.bullet_logger = bullet_enabled?
- Bullet.console = bullet_enabled?
+ if Gitlab::Bullet.extra_logging_enabled?
+ Bullet.bullet_logger = true
+ Bullet.console = true
+ end
Bullet.raise = Rails.env.test?
+
+ Bullet.stacktrace_excludes = Gitlab::Bullet::Exclusions.new.execute
end
end
end