lib/sentry/rails/controller_transaction.rb in sentry-rails-5.5.0 vs lib/sentry/rails/controller_transaction.rb in sentry-rails-5.6.0

- old
+ new

@@ -1,10 +1,12 @@ module Sentry module Rails module ControllerTransaction def self.included(base) base.prepend_before_action do |controller| - Sentry.get_current_scope.set_transaction_name("#{controller.class}##{controller.action_name}", source: :view) + if Sentry.initialized? + Sentry.get_current_scope.set_transaction_name("#{controller.class}##{controller.action_name}", source: :view) + end end end end end end