Class: Rollbar::Configuration
- Inherits:
-
Object
- Object
- Rollbar::Configuration
- Defined in:
- lib/rollbar/configuration.rb
Constant Summary collapse
- SEND_EXTRA_FRAME_DATA_OPTIONS =
[:none, :app, :all].freeze
- DEFAULT_ENDPOINT =
'https://api.rollbar.com/api/1/item/'.freeze
- DEFAULT_WEB_BASE =
'https://rollbar.com'.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#anonymize_user_ip ⇒ Object
Returns the value of attribute anonymize_user_ip.
-
#async_handler ⇒ Object
Returns the value of attribute async_handler.
-
#async_json_payload ⇒ Object
Returns the value of attribute async_json_payload.
-
#async_skip_report_handler ⇒ Object
Returns the value of attribute async_skip_report_handler.
-
#backtrace_cleaner ⇒ Object
Returns the value of attribute backtrace_cleaner.
-
#before_process ⇒ Object
Returns the value of attribute before_process.
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#capture_uncaught ⇒ Object
Returns the value of attribute capture_uncaught.
-
#code_version ⇒ Object
Returns the value of attribute code_version.
-
#collect_user_ip ⇒ Object
Returns the value of attribute collect_user_ip.
-
#configured_options ⇒ Object
Returns the value of attribute configured_options.
-
#custom_data_method ⇒ Object
Returns the value of attribute custom_data_method.
-
#default_logger ⇒ Object
Returns the value of attribute default_logger.
-
#delayed_job_enabled ⇒ Object
Returns the value of attribute delayed_job_enabled.
-
#disable_action_mailer_monkey_patch ⇒ Object
Returns the value of attribute disable_action_mailer_monkey_patch.
-
#disable_core_monkey_patch ⇒ Object
Returns the value of attribute disable_core_monkey_patch.
-
#disable_monkey_patch ⇒ Object
Returns the value of attribute disable_monkey_patch.
-
#disable_rack_monkey_patch ⇒ Object
Returns the value of attribute disable_rack_monkey_patch.
-
#dj_threshold ⇒ Object
Returns the value of attribute dj_threshold.
-
#dj_use_scoped_block ⇒ Object
Returns the value of attribute dj_use_scoped_block.
-
#enable_error_context ⇒ Object
Returns the value of attribute enable_error_context.
-
#enable_rails_error_subscriber ⇒ Object
Returns the value of attribute enable_rails_error_subscriber.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#exception_level_filters ⇒ Object
Returns the value of attribute exception_level_filters.
-
#failover_handlers ⇒ Object
Returns the value of attribute failover_handlers.
-
#filepath ⇒ Object
Returns the value of attribute filepath.
-
#files_processed_duration ⇒ Object
Returns the value of attribute files_processed_duration.
-
#files_processed_enabled ⇒ Object
Returns the value of attribute files_processed_enabled.
-
#files_processed_size ⇒ Object
Returns the value of attribute files_processed_size.
-
#files_with_pid_name_enabled ⇒ Object
Returns the value of attribute files_with_pid_name_enabled.
-
#framework ⇒ Object
Returns the value of attribute framework.
-
#host ⇒ Object
Returns the value of attribute host.
-
#ignore_internal_errors ⇒ Object
Returns the value of attribute ignore_internal_errors.
-
#ignored_person_ids ⇒ Object
Returns the value of attribute ignored_person_ids.
-
#js_enabled ⇒ Object
Returns the value of attribute js_enabled.
-
#js_options ⇒ Object
Returns the value of attribute js_options.
-
#locals ⇒ Object
Returns the value of attribute locals.
-
#log_payload ⇒ Object
Returns the value of attribute log_payload.
- #logger ⇒ Object
-
#logger_level ⇒ Object
Returns the value of attribute logger_level.
-
#net_retries ⇒ Object
Returns the value of attribute net_retries.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#payload_options ⇒ Object
Returns the value of attribute payload_options.
-
#person_email_method ⇒ Object
Returns the value of attribute person_email_method.
-
#person_id_method ⇒ Object
Returns the value of attribute person_id_method.
-
#person_method ⇒ Object
Returns the value of attribute person_method.
-
#person_username_method ⇒ Object
Returns the value of attribute person_username_method.
-
#populate_empty_backtraces ⇒ Object
Returns the value of attribute populate_empty_backtraces.
-
#project_gem_paths ⇒ Object
readonly
Returns the value of attribute project_gem_paths.
-
#proxy ⇒ Object
Returns the value of attribute proxy.
-
#raise_on_error ⇒ Object
Returns the value of attribute raise_on_error.
-
#randomize_scrub_length ⇒ Object
Returns the value of attribute randomize_scrub_length.
-
#report_dj_data ⇒ Object
Returns the value of attribute report_dj_data.
-
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
-
#root ⇒ Object
Returns the value of attribute root.
-
#safely ⇒ Object
(also: #safely?)
Returns the value of attribute safely.
-
#scrub_fields ⇒ Object
Returns the value of attribute scrub_fields.
-
#scrub_headers ⇒ Object
Returns the value of attribute scrub_headers.
-
#scrub_password ⇒ Object
Returns the value of attribute scrub_password.
-
#scrub_user ⇒ Object
Returns the value of attribute scrub_user.
-
#scrub_whitelist ⇒ Object
Returns the value of attribute scrub_whitelist.
-
#send_extra_frame_data ⇒ Object
Returns the value of attribute send_extra_frame_data.
-
#sidekiq_threshold ⇒ Object
Returns the value of attribute sidekiq_threshold.
-
#sidekiq_use_scoped_block ⇒ Object
Returns the value of attribute sidekiq_use_scoped_block.
-
#transform ⇒ Object
Returns the value of attribute transform.
-
#transmit ⇒ Object
Returns the value of attribute transmit.
-
#uncaught_exception_level ⇒ Object
Returns the value of attribute uncaught_exception_level.
-
#use_async ⇒ Object
Returns the value of attribute use_async.
-
#use_eventmachine ⇒ Object
Returns the value of attribute use_eventmachine.
-
#use_exception_level_filters_default ⇒ Object
Returns the value of attribute use_exception_level_filters_default.
-
#use_payload_access_token ⇒ Object
Returns the value of attribute use_payload_access_token.
-
#user_ip_obfuscator_secret ⇒ Object
Returns the value of attribute user_ip_obfuscator_secret.
-
#user_ip_rack_env_key ⇒ Object
Returns the value of attribute user_ip_rack_env_key.
-
#verify_ssl_peer ⇒ Object
Returns the value of attribute verify_ssl_peer.
-
#web_base ⇒ Object
Returns the value of attribute web_base.
-
#write_to_file ⇒ Object
Returns the value of attribute write_to_file.
Instance Method Summary collapse
-
#[](option) ⇒ Object
allow params to be read like a hash.
- #execute_hook(symbol, *args) ⇒ Object
- #hook(symbol, &block) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #initialize_copy(orig) ⇒ Object
- #merge(options) ⇒ Object
- #merge!(options) ⇒ Object
- #project_gems=(gems) ⇒ Object
- #use_active_job(options = {}) ⇒ Object
- #use_delayed_job(options = {}) ⇒ Object
- #use_resque(options = {}) ⇒ Object
- #use_shoryuken(options = {}) ⇒ Object
- #use_sidekiq(options = {}) ⇒ Object
- #use_sidekiq=(value) ⇒ Object
- #use_sucker_punch ⇒ Object
- #use_sucker_punch=(_value) ⇒ Object
- #use_thread(options = {}) ⇒ Object
- #wrapped_clone ⇒ Object (also: #clone)
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/rollbar/configuration.rb', line 92 def initialize @access_token = nil @async_handler = nil @before_process = [] @branch = nil @capture_uncaught = nil @code_version = nil @custom_data_method = nil @default_logger = lambda { ::Logger.new($stderr) } @logger_level = :info @delayed_job_enabled = true @disable_monkey_patch = false @disable_action_mailer_monkey_patch = false @disable_core_monkey_patch = false @disable_rack_monkey_patch = false @enable_error_context = true @enable_rails_error_subscriber = false @dj_threshold = 0 @dj_use_scoped_block = false @async_skip_report_handler = nil @enabled = nil # set to true when configure is called @endpoint = DEFAULT_ENDPOINT @environment = nil @exception_level_filters = { 'ActiveRecord::RecordNotFound' => 'warning', 'AbstractController::ActionNotFound' => 'warning', 'ActionController::RoutingError' => 'warning' } @failover_handlers = [] @framework = 'Plain' @ignore_internal_errors = [ 'Net::ReadTimeout', 'Net::OpenTimeout', 'SocketError' ] @ignored_person_ids = [] @host = nil @payload_options = {} @person_method = 'current_user' @person_id_method = 'id' @person_username_method = nil @person_email_method = nil @project_gems = [] @populate_empty_backtraces = false @report_dj_data = true @open_timeout = 3 @request_timeout = 3 @net_retries = 3 @root = nil @js_enabled = false @js_options = {} @locals = {} @scrub_fields = [:passwd, :password, :password_confirmation, :secret, :confirm_password, :password_confirmation, :secret_token, :api_key, :access_token, :accessToken, :session_id] @scrub_user = true @scrub_password = true @randomize_scrub_length = false @scrub_whitelist = [] @uncaught_exception_level = 'error' @scrub_headers = ['Authorization'] @sidekiq_threshold = 0 @sidekiq_use_scoped_block = false @safely = false @transform = [] @use_async = false @async_json_payload = false @use_eventmachine = false @verify_ssl_peer = true @web_base = DEFAULT_WEB_BASE @send_extra_frame_data = :none @project_gem_paths = [] @use_exception_level_filters_default = false @proxy = nil @raise_on_error = false @transmit = true @log_payload = false @collect_user_ip = true @anonymize_user_ip = false @user_ip_obfuscator_secret = nil @user_ip_rack_env_key = nil @backtrace_cleaner = nil @hooks = { :on_error_response => nil, # params: response :on_report_internal_error => nil # params: exception } @write_to_file = false @filepath = nil @files_with_pid_name_enabled = false @files_processed_enabled = false @files_processed_duration = 60 @files_processed_size = 5 * 1000 * 1000 @use_payload_access_token = false @configured_options = ConfiguredOptions.new(self) end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def access_token @access_token end |
#anonymize_user_ip ⇒ Object
Returns the value of attribute anonymize_user_ip.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def anonymize_user_ip @anonymize_user_ip end |
#async_handler ⇒ Object
Returns the value of attribute async_handler.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def async_handler @async_handler end |
#async_json_payload ⇒ Object
Returns the value of attribute async_json_payload.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def async_json_payload @async_json_payload end |
#async_skip_report_handler ⇒ Object
Returns the value of attribute async_skip_report_handler.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def async_skip_report_handler @async_skip_report_handler end |
#backtrace_cleaner ⇒ Object
Returns the value of attribute backtrace_cleaner.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def backtrace_cleaner @backtrace_cleaner end |
#before_process ⇒ Object
Returns the value of attribute before_process.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def before_process @before_process end |
#branch ⇒ Object
Returns the value of attribute branch.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def branch @branch end |
#capture_uncaught ⇒ Object
Returns the value of attribute capture_uncaught.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def capture_uncaught @capture_uncaught end |
#code_version ⇒ Object
Returns the value of attribute code_version.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def code_version @code_version end |
#collect_user_ip ⇒ Object
Returns the value of attribute collect_user_ip.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def collect_user_ip @collect_user_ip end |
#configured_options ⇒ Object
Returns the value of attribute configured_options.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def @configured_options end |
#custom_data_method ⇒ Object
Returns the value of attribute custom_data_method.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def custom_data_method @custom_data_method end |
#default_logger ⇒ Object
Returns the value of attribute default_logger.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def default_logger @default_logger end |
#delayed_job_enabled ⇒ Object
Returns the value of attribute delayed_job_enabled.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def delayed_job_enabled @delayed_job_enabled end |
#disable_action_mailer_monkey_patch ⇒ Object
Returns the value of attribute disable_action_mailer_monkey_patch.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def disable_action_mailer_monkey_patch @disable_action_mailer_monkey_patch end |
#disable_core_monkey_patch ⇒ Object
Returns the value of attribute disable_core_monkey_patch.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def disable_core_monkey_patch @disable_core_monkey_patch end |
#disable_monkey_patch ⇒ Object
Returns the value of attribute disable_monkey_patch.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def disable_monkey_patch @disable_monkey_patch end |
#disable_rack_monkey_patch ⇒ Object
Returns the value of attribute disable_rack_monkey_patch.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def disable_rack_monkey_patch @disable_rack_monkey_patch end |
#dj_threshold ⇒ Object
Returns the value of attribute dj_threshold.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def dj_threshold @dj_threshold end |
#dj_use_scoped_block ⇒ Object
Returns the value of attribute dj_use_scoped_block.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def dj_use_scoped_block @dj_use_scoped_block end |
#enable_error_context ⇒ Object
Returns the value of attribute enable_error_context.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def enable_error_context @enable_error_context end |
#enable_rails_error_subscriber ⇒ Object
Returns the value of attribute enable_rails_error_subscriber.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def enable_rails_error_subscriber @enable_rails_error_subscriber end |
#enabled ⇒ Object
Returns the value of attribute enabled.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def enabled @enabled end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def endpoint @endpoint end |
#environment ⇒ Object
Returns the value of attribute environment.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def environment @environment end |
#exception_level_filters ⇒ Object
Returns the value of attribute exception_level_filters.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def exception_level_filters @exception_level_filters end |
#failover_handlers ⇒ Object
Returns the value of attribute failover_handlers.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def failover_handlers @failover_handlers end |
#filepath ⇒ Object
Returns the value of attribute filepath.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def filepath @filepath end |
#files_processed_duration ⇒ Object
Returns the value of attribute files_processed_duration.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def files_processed_duration @files_processed_duration end |
#files_processed_enabled ⇒ Object
Returns the value of attribute files_processed_enabled.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def files_processed_enabled @files_processed_enabled end |
#files_processed_size ⇒ Object
Returns the value of attribute files_processed_size.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def files_processed_size @files_processed_size end |
#files_with_pid_name_enabled ⇒ Object
Returns the value of attribute files_with_pid_name_enabled.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def files_with_pid_name_enabled @files_with_pid_name_enabled end |
#framework ⇒ Object
Returns the value of attribute framework.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def framework @framework end |
#host ⇒ Object
Returns the value of attribute host.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def host @host end |
#ignore_internal_errors ⇒ Object
Returns the value of attribute ignore_internal_errors.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def ignore_internal_errors @ignore_internal_errors end |
#ignored_person_ids ⇒ Object
Returns the value of attribute ignored_person_ids.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def ignored_person_ids @ignored_person_ids end |
#js_enabled ⇒ Object
Returns the value of attribute js_enabled.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def js_enabled @js_enabled end |
#js_options ⇒ Object
Returns the value of attribute js_options.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def @js_options end |
#locals ⇒ Object
Returns the value of attribute locals.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def locals @locals end |
#log_payload ⇒ Object
Returns the value of attribute log_payload.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def log_payload @log_payload end |
#logger ⇒ Object
369 370 371 |
# File 'lib/rollbar/configuration.rb', line 369 def logger @logger ||= default_logger.call end |
#logger_level ⇒ Object
Returns the value of attribute logger_level.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def logger_level @logger_level end |
#net_retries ⇒ Object
Returns the value of attribute net_retries.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def net_retries @net_retries end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def open_timeout @open_timeout end |
#payload_options ⇒ Object
Returns the value of attribute payload_options.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def @payload_options end |
#person_email_method ⇒ Object
Returns the value of attribute person_email_method.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def person_email_method @person_email_method end |
#person_id_method ⇒ Object
Returns the value of attribute person_id_method.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def person_id_method @person_id_method end |
#person_method ⇒ Object
Returns the value of attribute person_method.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def person_method @person_method end |
#person_username_method ⇒ Object
Returns the value of attribute person_username_method.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def person_username_method @person_username_method end |
#populate_empty_backtraces ⇒ Object
Returns the value of attribute populate_empty_backtraces.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def populate_empty_backtraces @populate_empty_backtraces end |
#project_gem_paths ⇒ Object (readonly)
Returns the value of attribute project_gem_paths.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def project_gem_paths @project_gem_paths end |
#proxy ⇒ Object
Returns the value of attribute proxy.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def proxy @proxy end |
#raise_on_error ⇒ Object
Returns the value of attribute raise_on_error.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def raise_on_error @raise_on_error end |
#randomize_scrub_length ⇒ Object
Returns the value of attribute randomize_scrub_length.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def randomize_scrub_length @randomize_scrub_length end |
#report_dj_data ⇒ Object
Returns the value of attribute report_dj_data.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def report_dj_data @report_dj_data end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def request_timeout @request_timeout end |
#root ⇒ Object
Returns the value of attribute root.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def root @root end |
#safely ⇒ Object Also known as: safely?
Returns the value of attribute safely.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def safely @safely end |
#scrub_fields ⇒ Object
Returns the value of attribute scrub_fields.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def scrub_fields @scrub_fields end |
#scrub_headers ⇒ Object
Returns the value of attribute scrub_headers.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def scrub_headers @scrub_headers end |
#scrub_password ⇒ Object
Returns the value of attribute scrub_password.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def scrub_password @scrub_password end |
#scrub_user ⇒ Object
Returns the value of attribute scrub_user.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def scrub_user @scrub_user end |
#scrub_whitelist ⇒ Object
Returns the value of attribute scrub_whitelist.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def scrub_whitelist @scrub_whitelist end |
#send_extra_frame_data ⇒ Object
Returns the value of attribute send_extra_frame_data.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def send_extra_frame_data @send_extra_frame_data end |
#sidekiq_threshold ⇒ Object
Returns the value of attribute sidekiq_threshold.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def sidekiq_threshold @sidekiq_threshold end |
#sidekiq_use_scoped_block ⇒ Object
Returns the value of attribute sidekiq_use_scoped_block.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def sidekiq_use_scoped_block @sidekiq_use_scoped_block end |
#transform ⇒ Object
Returns the value of attribute transform.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def transform @transform end |
#transmit ⇒ Object
Returns the value of attribute transmit.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def transmit @transmit end |
#uncaught_exception_level ⇒ Object
Returns the value of attribute uncaught_exception_level.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def uncaught_exception_level @uncaught_exception_level end |
#use_async ⇒ Object
Returns the value of attribute use_async.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def use_async @use_async end |
#use_eventmachine ⇒ Object
Returns the value of attribute use_eventmachine.
78 79 80 |
# File 'lib/rollbar/configuration.rb', line 78 def use_eventmachine @use_eventmachine end |
#use_exception_level_filters_default ⇒ Object
Returns the value of attribute use_exception_level_filters_default.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def use_exception_level_filters_default @use_exception_level_filters_default end |
#use_payload_access_token ⇒ Object
Returns the value of attribute use_payload_access_token.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def use_payload_access_token @use_payload_access_token end |
#user_ip_obfuscator_secret ⇒ Object
Returns the value of attribute user_ip_obfuscator_secret.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def user_ip_obfuscator_secret @user_ip_obfuscator_secret end |
#user_ip_rack_env_key ⇒ Object
Returns the value of attribute user_ip_rack_env_key.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def user_ip_rack_env_key @user_ip_rack_env_key end |
#verify_ssl_peer ⇒ Object
Returns the value of attribute verify_ssl_peer.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def verify_ssl_peer @verify_ssl_peer end |
#web_base ⇒ Object
Returns the value of attribute web_base.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def web_base @web_base end |
#write_to_file ⇒ Object
Returns the value of attribute write_to_file.
7 8 9 |
# File 'lib/rollbar/configuration.rb', line 7 def write_to_file @write_to_file end |
Instance Method Details
#[](option) ⇒ Object
allow params to be read like a hash
357 358 359 |
# File 'lib/rollbar/configuration.rb', line 357 def [](option) send(option) end |
#execute_hook(symbol, *args) ⇒ Object
385 386 387 |
# File 'lib/rollbar/configuration.rb', line 385 def execute_hook(symbol, *args) hook(symbol).call(*args) if hook(symbol).is_a?(Proc) end |
#hook(symbol, &block) ⇒ Object
373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/rollbar/configuration.rb', line 373 def hook(symbol, &block) unless @hooks.key?(symbol) raise StandardError, "Hook :#{symbol} is not supported by Rollbar SDK." end if block_given? @hooks[symbol] = block else @hooks[symbol] end end |
#initialize_copy(orig) ⇒ Object
190 191 192 193 194 195 196 197 |
# File 'lib/rollbar/configuration.rb', line 190 def initialize_copy(orig) super instance_variables.each do |var| instance_var = instance_variable_get(var) instance_variable_set(var, Rollbar::Util.deep_copy(instance_var)) end end |
#merge(options) ⇒ Object
208 209 210 211 212 213 |
# File 'lib/rollbar/configuration.rb', line 208 def merge() new_configuration = clone new_configuration.merge!() new_configuration end |
#merge!(options) ⇒ Object
215 216 217 218 219 220 221 222 223 224 |
# File 'lib/rollbar/configuration.rb', line 215 def merge!() .each do |name, value| variable_name = "@#{name}" next unless instance_variable_defined?(variable_name) instance_variable_set(variable_name, value) end self end |
#project_gems=(gems) ⇒ Object
311 312 313 314 315 316 317 318 319 320 |
# File 'lib/rollbar/configuration.rb', line 311 def project_gems=(gems) @project_gem_paths = gems.map do |name| found = Gem::Specification.each.select { |spec| name === spec.name } puts "[Rollbar] No gems found matching #{name.inspect}" if found.empty? found end @project_gem_paths.flatten! @project_gem_paths.uniq! @project_gem_paths.map!(&:gem_dir) end |
#use_active_job(options = {}) ⇒ Object
226 227 228 229 230 231 232 233 234 |
# File 'lib/rollbar/configuration.rb', line 226 def use_active_job( = {}) require 'rollbar/delay/active_job' Rollbar::Delay::ActiveJob.queue_as([:queue] || Rollbar::Delay::ActiveJob.default_queue_name) @use_async = true @async_handler = Rollbar::Delay::ActiveJob end |
#use_delayed_job(options = {}) ⇒ Object
236 237 238 239 240 241 242 243 |
# File 'lib/rollbar/configuration.rb', line 236 def use_delayed_job( = {}) require 'rollbar/delay/delayed_job' Rollbar::Delay::DelayedJob.queue = [:queue] if [:queue] @use_async = true @async_handler = Rollbar::Delay::DelayedJob end |
#use_resque(options = {}) ⇒ Object
251 252 253 254 255 256 257 258 |
# File 'lib/rollbar/configuration.rb', line 251 def use_resque( = {}) require 'rollbar/delay/resque' if defined?(Resque) Rollbar::Delay::Resque::Job.queue = [:queue] if [:queue] @use_async = true @async_handler = Rollbar::Delay::Resque end |
#use_shoryuken(options = {}) ⇒ Object
260 261 262 263 264 265 266 267 |
# File 'lib/rollbar/configuration.rb', line 260 def use_shoryuken( = {}) require 'rollbar/delay/shoryuken' if defined?(Shoryuken) Rollbar::Delay::Shoryuken.queue = [:queue] if [:queue] @use_async = true @async_handler = Rollbar::Delay::Shoryuken end |
#use_sidekiq(options = {}) ⇒ Object
245 246 247 248 249 |
# File 'lib/rollbar/configuration.rb', line 245 def use_sidekiq( = {}) require 'rollbar/delay/sidekiq' if defined?(Sidekiq) @use_async = true @async_handler = Rollbar::Delay::Sidekiq.new() end |
#use_sidekiq=(value) ⇒ Object
269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/rollbar/configuration.rb', line 269 def use_sidekiq=(value) = '#use_sidekiq=(value) has been deprecated in favor ' \ 'of #use_sidekiq(options = {}). Please update your rollbar configuration.' if defined?(ActiveSupport) ActiveSupport::Deprecation.warn() else puts() end value.is_a?(Hash) ? use_sidekiq(value) : use_sidekiq end |
#use_sucker_punch ⇒ Object
288 289 290 291 292 |
# File 'lib/rollbar/configuration.rb', line 288 def use_sucker_punch require 'rollbar/delay/sucker_punch' if defined?(SuckerPunch) @use_async = true @async_handler = Rollbar::Delay::SuckerPunch end |
#use_sucker_punch=(_value) ⇒ Object
294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/rollbar/configuration.rb', line 294 def use_sucker_punch=(_value) = '#use_sucker_punch=(value) has been deprecated in ' \ 'favor of #use_sucker_punch. Please update your rollbar configuration.' if defined?(ActiveSupport) ActiveSupport::Deprecation.warn() else puts() end use_sucker_punch end |
#use_thread(options = {}) ⇒ Object
281 282 283 284 285 286 |
# File 'lib/rollbar/configuration.rb', line 281 def use_thread( = {}) require 'rollbar/delay/thread' @use_async = true Rollbar::Delay::Thread. = @async_handler = Rollbar::Delay::Thread end |
#wrapped_clone ⇒ Object Also known as: clone
199 200 201 202 203 204 |
# File 'lib/rollbar/configuration.rb', line 199 def wrapped_clone original_clone.tap do |new_config| new_config. = ConfiguredOptions.new(new_config) new_config..configured = .configured end end |