module ScoutApm::ErrorService

Constants

API_VERSION
HEADERS

Public Class Methods

capture(exception, params = {}) click to toggle source

Public API to force a given exception to be captured. Still obeys the ignore list Used internally by SidekiqException

# File lib/scout_apm/error_service.rb, line 17
def self.capture(exception, params = {})
  return if disabled?

  context = ScoutApm::Agent.instance.context
  return if context.ignored_exceptions.ignore?(exception)

  context.errors_buffer.capture(exception, env)
end
disabled?() click to toggle source
# File lib/scout_apm/error_service.rb, line 30
def self.disabled?
  !enabled?
end
enabled?() click to toggle source
# File lib/scout_apm/error_service.rb, line 26
def self.enabled?
  ScoutApm::Agent.instance.context.config.value("errors_enabled")
end