class Atatus::Spies::ActionDispatchSpy

@api private

Public Instance Methods

install() click to toggle source
# File lib/atatus/spies/action_dispatch.rb, line 25
def install
  if defined?(::ActionDispatch) && defined?(::ActionDispatch::ShowExceptions)

    ::ActionDispatch::ShowExceptions.class_eval do
      alias render_exception_without_apm render_exception

      def render_exception(env, exception)
        context = Atatus.build_context(rack_env: env, for_type: :error)
        Atatus.report(exception, context: context, handled: false)

        render_exception_without_apm env, exception
      end
    end

  end
end
render_exception(env, exception) click to toggle source
# File lib/atatus/spies/action_dispatch.rb, line 31
def render_exception(env, exception)
  context = Atatus.build_context(rack_env: env, for_type: :error)
  Atatus.report(exception, context: context, handled: false)

  render_exception_without_apm env, exception
end