Sha256: abc5a549362f99e80df0a3b2e88732df26c3deda5a31466fdded866373e663cf

Contents?: true

Size: 1.39 KB

Versions: 10

Compression:

Stored size: 1.39 KB

Contents

module Sentry
  class Configuration
    attr_reader :rails

    def post_initialization_callback
      @rails = Sentry::Rails::Configuration.new
      @excluded_exceptions = @excluded_exceptions.concat(Sentry::Rails::IGNORE_DEFAULT)
    end
  end

  module Rails
    IGNORE_DEFAULT = [
      'AbstractController::ActionNotFound',
      'ActionController::BadRequest',
      'ActionController::InvalidAuthenticityToken',
      'ActionController::InvalidCrossOriginRequest',
      'ActionController::MethodNotAllowed',
      'ActionController::NotImplemented',
      'ActionController::ParameterMissing',
      'ActionController::RoutingError',
      'ActionController::UnknownAction',
      'ActionController::UnknownFormat',
      'ActionController::UnknownHttpMethod',
      'ActionDispatch::Http::Parameters::ParseError',
      'ActiveJob::DeserializationError', # Can cause infinite loops
      'ActiveRecord::RecordNotFound'
    ].freeze
    class Configuration
      # Rails catches exceptions in the ActionDispatch::ShowExceptions or
      # ActionDispatch::DebugExceptions middlewares, depending on the environment.
      # When `rails_report_rescued_exceptions` is true (it is by default), Sentry
      # will report exceptions even when they are rescued by these middlewares.
      attr_accessor :report_rescued_exceptions

      def initialize
        @report_rescued_exceptions = true
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sentry-rails-4.1.4 lib/sentry/rails/configuration.rb
sentry-rails-4.1.3 lib/sentry/rails/configuration.rb
sentry-rails-4.1.2 lib/sentry/rails/configuration.rb
sentry-rails-4.1.1 lib/sentry/rails/configuration.rb
sentry-rails-4.1.0 lib/sentry/rails/configuration.rb
sentry-rails-4.0.0 lib/sentry/rails/configuration.rb
sentry-rails-0.3.0 lib/sentry/rails/configuration.rb
sentry-rails-0.2.0 lib/sentry/rails/configuration.rb
sentry-rails-0.1.2 lib/sentry/rails/configuration.rb
sentry-rails-0.1.1 lib/sentry/rails/configuration.rb