module Airbrake
def [](notifier_name)
- Since: - v1.8.0
Returns:
-
(Airbrake::Notifier, nil)
-
def [](notifier_name) @notifiers[notifier_name] end
def add_filter(filter = nil, &block)
- Note: - Once a filter was added, there's no way to delete it
Returns:
-
(void)
-
Other tags:
- Yieldreturn: -
Other tags:
- Yieldparam: -
Other tags:
- Yield: - The notice to filter
Parameters:
-
filter
(#call
) -- The filter object
Other tags:
- Example: Ignore with help of a class -
Example: Ignore based on some condition -
Example: Ignore all notices -
def add_filter(filter = nil, &block) @notifiers[:default].add_filter(filter, &block) end
def build_notice(exception, params = {})
-
(Airbrake::Notice)
- the notice built with help of the given
Parameters:
-
params
(Hash
) -- The additional params attached to the notice -
exception
(Exception
) -- The exception on top of which the notice
def build_notice(exception, params = {}) @notifiers[:default].build_notice(exception, params) end
def close
-
(void)
-
def close @notifiers[:default].close end
def configure(notifier_name = :default)
- Note: - There's no way to read config values outside of this library
Note: - There's no way to reconfigure a notifier
Raises:
-
(Airbrake::Error)
- when trying to reconfigure already
Returns:
-
(void)
-
Other tags:
- Yieldparam: config -
Other tags:
- Yield: - The configuration object
Parameters:
-
notifier_name
(Symbol
) -- the name to be associated with the notifier
Other tags:
- Example: Configuring a named notifier -
Example: Configuring the default notifier -
def configure(notifier_name = :default) yield config = Airbrake::Config.new if @notifiers.key?(notifier_name) raise Airbrake::Error, "the '#{notifier_name}' notifier was already configured" else @notifiers[notifier_name] = Notifier.new(config) end end
def configured?
- Since: - 2.3.0
Returns:
-
(Boolean)
- true if the notifier was configured, false otherwise
def configured? @notifiers[:default].configured? end
def create_deploy(deploy_params)
-
(void)
-
Options Hash:
(**deploy_params)
-
:version
(Symbol
) -- -
:revision
(Symbol
) -- -
:repository
(Symbol
) -- -
:username
(Symbol
) -- -
:environment
(Symbol
) --
Parameters:
-
deploy_params
(Hash{Symbol=>String}
) -- The params for the API
def create_deploy(deploy_params) @notifiers[:default].create_deploy(deploy_params) end
def notify(exception, params = {}, &block)
- See: .notify_sync -
Returns:
-
(Airbrake::Promise)
-
Other tags:
- Yieldreturn: -
Other tags:
- Yieldparam: -
Other tags:
- Yield: - The notice to filter
Parameters:
-
params
(Hash
) -- The additional payload to be sent to Airbrake. Can -
exception
(Exception, String, Airbrake::Notice
) -- The exception to be
Other tags:
- Example: Sending a Notice -
Example: Sending a string -
Example: Sending an exception -
def notify(exception, params = {}, &block) @notifiers[:default].notify(exception, params, &block) end
def notify_sync(exception, params = {}, &block)
- See: .notify -
Returns:
-
(Hash{String=>String})
- the reponse from the server
Other tags:
- Yieldreturn: -
Other tags:
- Yieldparam: -
Other tags:
- Yield: - The notice to filter
Parameters:
-
params
(Hash
) -- The additional payload to be sent to Airbrake. Can -
exception
(Exception, String, Airbrake::Notice
) -- The exception to be
def notify_sync(exception, params = {}, &block) @notifiers[:default].notify_sync(exception, params, &block) end