module Airbrake
def add_filter(filter = nil, &block)
-
(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) @notice_notifier.add_filter(filter, &block) end
def add_performance_filter(filter = nil, &block)
- See: Airbrake::PerformanceNotifier#add_filter -
Other tags:
- Since: - v3.2.0
Returns:
-
(void)-
Other tags:
- Yieldreturn: -
Other tags:
- Yieldparam: -
Other tags:
- Yield: - The resource to filter
Parameters:
-
filter(#call) -- The filter object
Other tags:
- Example: Filter with help of a class -
Example: Filter sensitive data -
Example: Ignore all resources -
def add_performance_filter(filter = nil, &block) @performance_notifier.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 = {}) @notice_notifier.build_notice(exception, params) end
def close
-
(void)-
def close @notice_notifier.close end
def configure
- Note: - There's no way to read config values outside of this library
Raises:
-
(Airbrake::Error)- when either +project_id+ or +project_key+ -
(Airbrake::Error)- when trying to reconfigure already
Returns:
-
(void)-
Other tags:
- Yieldparam: config -
Other tags:
- Yield: - The configuration object
def configure yield config = Airbrake::Config.instance raise Airbrake::Error, config.validation_error_message unless config.valid? Airbrake::Loggable.instance = Airbrake::Config.instance @performance_notifier = PerformanceNotifier.new @notice_notifier = NoticeNotifier.new @deploy_notifier = DeployNotifier.new end
def configured?
- Since: - v2.3.0
Returns:
-
(Boolean)- true if the notifier was configured, false otherwise
def configured? @notice_notifier.configured? end
def delete_filter(filter_class)
- Note: - This method cannot delete filters assigned via the Proc form.
Other tags:
- Since: - v3.1.0
Returns:
-
(void)-
Parameters:
-
filter_class(Class) -- The class of the filter you want to delete
def delete_filter(filter_class) @notice_notifier.delete_filter(filter_class) end
def delete_performance_filter(filter_class)
- See: Airbrake::PerformanceNotifier#delete_filter -
Other tags:
- Note: - This method cannot delete filters assigned via the Proc form.
Other tags:
- Since: - v3.2.0
Returns:
-
(void)-
Parameters:
-
filter_class(Class) -- The class of the filter you want to delete
def delete_performance_filter(filter_class) @performance_notifier.delete_filter(filter_class) end
def merge_context(context)
-
(void)-
Parameters:
-
context(Hash{Symbol=>Object}) --
def merge_context(context) @notice_notifier.merge_context(context) 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) @notice_notifier.notify(exception, params, &block) end
def notify_deploy(deploy_info)
-
(void)-
Options Hash:
(**deploy_info)-
:version(Symbol) -- -
:revision(Symbol) -- -
:repository(Symbol) -- -
:username(Symbol) -- -
:environment(Symbol) --
Parameters:
-
deploy_info(Hash{Symbol=>String}) -- The params for the API
def notify_deploy(deploy_info) @deploy_notifier.notify(deploy_info) end
def notify_query(query_info)
- See: Airbrake::PerformanceNotifier#notify -
Other tags:
- Since: - v3.2.0
Returns:
-
(void)-
Options Hash:
(**request_info)-
:end_time(Time) -- When the query finished (optional) -
:start_time(Date) -- When the query started executing -
:query(String) -- The query that was executed -
:route(String) -- The route that triggered this SQL -
:method(String) -- The HTTP method that triggered this -
:environment(String) --
Parameters:
-
query_info(Hash{Symbol=>Object}) --
def notify_query(query_info) @performance_notifier.notify(Query.new(query_info)) end
def notify_request(request_info)
- See: Airbrake::PerformanceNotifier#notify -
Other tags:
- Since: - v3.0.0
Returns:
-
(void)-
Options Hash:
(**request_info)-
:end_time(Time) -- When the request ended (optional) -
:start_time(Date) -- When the request started -
:line(Integer) -- The line that executes the query -
:file(String) -- The file that has the function that -
:func(String) -- The function that called the query -
:status_code(Integer) -- The respose code that the -
:route(String) -- The route that was invoked -
:method(String) -- The HTTP method that was invoked
Parameters:
-
request_info(Hash{Symbol=>Object}) --
def notify_request(request_info) @performance_notifier.notify(Request.new(request_info)) 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) @notice_notifier.notify_sync(exception, params, &block) end