Class: Raygun::Configuration
- Inherits:
-
Object
- Object
- Raygun::Configuration
- Defined in:
- lib/raygun/configuration.rb
Constant Summary collapse
- IGNORE_DEFAULT =
Exception classes to ignore by default
['ActiveRecord::RecordNotFound', 'ActionController::RoutingError', 'ActionController::InvalidAuthenticityToken', 'CGI::Session::CookieStore::TamperedWithCookie', 'ActionController::UnknownAction', 'AbstractController::ActionNotFound', 'Mongoid::Errors::DocumentNotFound']
- DEFAULT_FILTER_PARAMETERS =
[ :password, :card_number, :cvv ]
Instance Attribute Summary collapse
-
#affected_user_identifier_methods ⇒ Object
Which methods should we try on the affected user object in order to get an identifier.
-
#affected_user_method ⇒ Object
Which controller method should we call to find out the affected user?.
-
#api_key ⇒ Object
Your Raygun API Key - this can be found on your dashboard at Raygun.io.
-
#custom_data ⇒ Object
Custom Data to send with each exception.
-
#failsafe_logger ⇒ Object
Failsafe logger (for exceptions that happen when we’re attempting to report exceptions).
-
#filter_parameters ⇒ Object
Which parameter keys should we filter out by default?.
-
#ignore ⇒ Object
Array of exception classes to ignore.
-
#logger ⇒ Object
Logger to use when if we find an exception :).
-
#silence_reporting ⇒ Object
Should we silence exception reporting (e.g in Development environments).
-
#version ⇒ Object
Version to use.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
45 46 47 48 49 50 51 52 53 |
# File 'lib/raygun/configuration.rb', line 45 def initialize # set default attribute values @ignore = IGNORE_DEFAULT @custom_data = {} @silence_reporting = nil @affected_user_method = :current_user @affected_user_identifier_methods = [ :email, :username, :id ] @filter_parameters = DEFAULT_FILTER_PARAMETERS end |
Instance Attribute Details
#affected_user_identifier_methods ⇒ Object
Which methods should we try on the affected user object in order to get an identifier
29 30 31 |
# File 'lib/raygun/configuration.rb', line 29 def affected_user_identifier_methods @affected_user_identifier_methods end |
#affected_user_method ⇒ Object
Which controller method should we call to find out the affected user?
26 27 28 |
# File 'lib/raygun/configuration.rb', line 26 def affected_user_method @affected_user_method end |
#api_key ⇒ Object
Your Raygun API Key - this can be found on your dashboard at Raygun.io
5 6 7 |
# File 'lib/raygun/configuration.rb', line 5 def api_key @api_key end |
#custom_data ⇒ Object
Custom Data to send with each exception
14 15 16 |
# File 'lib/raygun/configuration.rb', line 14 def custom_data @custom_data end |
#failsafe_logger ⇒ Object
Failsafe logger (for exceptions that happen when we’re attempting to report exceptions)
23 24 25 |
# File 'lib/raygun/configuration.rb', line 23 def failsafe_logger @failsafe_logger end |
#filter_parameters ⇒ Object
Which parameter keys should we filter out by default?
32 33 34 |
# File 'lib/raygun/configuration.rb', line 32 def filter_parameters @filter_parameters end |
#ignore ⇒ Object
Array of exception classes to ignore
8 9 10 |
# File 'lib/raygun/configuration.rb', line 8 def ignore @ignore end |
#logger ⇒ Object
Logger to use when if we find an exception :)
17 18 19 |
# File 'lib/raygun/configuration.rb', line 17 def logger @logger end |
#silence_reporting ⇒ Object
Should we silence exception reporting (e.g in Development environments)
20 21 22 |
# File 'lib/raygun/configuration.rb', line 20 def silence_reporting @silence_reporting end |
#version ⇒ Object
Version to use
11 12 13 |
# File 'lib/raygun/configuration.rb', line 11 def version @version end |
Instance Method Details
#[](key) ⇒ Object
55 56 57 |
# File 'lib/raygun/configuration.rb', line 55 def [](key) send(key) end |