Class: Err::Opbeat
Class Method Summary collapse
- .available? ⇒ Boolean
- .configure(&block) ⇒ Object
- .development_environments=(envs) ⇒ Object
- .ignore=(exception_names) ⇒ Object
- .message(msg, params = {}) ⇒ Object
- .notify(exception, params = {}) ⇒ Object
Methods inherited from Service
Class Method Details
.available? ⇒ Boolean
4 5 6 |
# File 'lib/err/services/opbeat.rb', line 4 def available? defined?(::Opbeat) end |
.configure(&block) ⇒ Object
8 9 10 11 |
# File 'lib/err/services/opbeat.rb', line 8 def configure(&block) return unless enabled? opbeat.configure(&block) end |
.development_environments=(envs) ⇒ Object
13 14 15 |
# File 'lib/err/services/opbeat.rb', line 13 def development_environments=(envs) config.environments = [config.current_environment] - envs.map(&:to_s) end |
.ignore=(exception_names) ⇒ Object
17 18 19 |
# File 'lib/err/services/opbeat.rb', line 17 def ignore=(exception_names) config.excluded_exceptions = exception_names end |
.message(msg, params = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/err/services/opbeat.rb', line 25 def (msg, params = {}) msg = msg.dup msg << " (#{params_string(params)})" if params.any? opbeat.captureMessage(msg) end |
.notify(exception, params = {}) ⇒ Object
21 22 23 |
# File 'lib/err/services/opbeat.rb', line 21 def notify(exception, params = {}) opbeat.captureException(exception) end |