Errbit Reporter: A python errbit client

class errbit_reporter.Configuration(api_key, errbit_url, project_root=None, environment_name='production', server_name=None)

Parameters that are used across clients and error notices

Parameters:
api_key : str
errbit provided to the app to associate errors with it
errbit_url : str
protocol and host of the errbit server (e.g. “https://api.airbrake.io”)
project_root : str, optional
Directory of the project’s source code which is replaced by [PROJECT_ROOT] in the backtrace and linked to line on github. (the defaults is the current working directory)
environment_name : str
Environment field on the error’s page (the default is ‘production’)
server_name : str
App Server field on error’s page (the default is the server’s hostname)
class errbit_reporter.Notice(config, error_class, error_message, backtrace=None)

The description of an exception that can be sent to errbit

classmethod from_exception(config, exc_info=None)

Creates a notice from an exception

serialize()

Serialize the notice to xml which errbit accepts for notice creation

class errbit_reporter.NoticeMetadata(config, id, err_id, problem_id, app_id, created_at, updated_at)

Metadata that returned by errbit that identifies a notice

Can be used to get the url to see the error page for the notice in errbit.

classmethod from_notice_xml(config, body)

Extracts the metadata from the response body of a notify request

url

Returns the url that shows the notice on errbit

class errbit_reporter.Client(config)

Errbit client used to send the notice to errbit

Parameters:
config : errbit_reporter.Configuration
Used to build the notice and its errbit_url is used to send the notice.
notify(exc_info=None, request_url=None, component=None, action=None, params={}, session={}, cgi_data={}, timeout=None)

Notify errbit of an exception

Parameters:
exc_info : (type, Exception, traceback), optional
Information from sys.exc_info() to notify errbit about (the default is the exception currently being handled)
request_url : str, optional
The url field that will be shown by errbit on the error page
component : str, optional
The 1st part of the where field on the error page in errbit
action : str, optional
The 2nd part of the where field on the error page in errbit
params : dict of str, {str, list, dict} pairs, optional
The data shown in the Parameters tab with the error in errbit.
session : dict of str, {str, list, dict} pairs, optional
The data shown in the Session tab with the error in errbit.
cgi_data : dict of str, {str, list, dict} pairs, optional
The data shown in the Environment tab with the error in errbit.
timeout : int, optional
The timeout in seconds for the request to errbit (the default is no timeout)
Returns:
errbit_reporter.NoticeMetadata
Identifiers to find the notice, error or problem in errbit
notify_on_exception(*args, **kwds)

Context manager that notifies errbit of any exceptions.

The exception will be re-raised after notifying errbit.

Parameters:
request_url : str, optional
The url field that will be shown by errbit on the error page
component : str, optional
The 1st part of the where field on the error page in errbit
action : str, optional
The 2nd part of the where field on the error page in errbit
params : dict of str, {str, list, dict} pairs, optional
The data shown in the Parameters tab with the error in errbit.
session : dict of str, {str, list, dict} pairs, optional
The data shown in the Session tab with the error in errbit.
cgi_data : dict of str, {str, list, dict} pairs, optional
The data shown in the Environment tab with the error in errbit.
timeout : int, optional
The timeout in seconds for the request to errbit (the default is no timeout)
send_notice(notice, timeout=None)

Send a Notice to errbit for an error

Parameters:
notice : errbit_reporter.Notice
The notice to send to errbit that describes the error
timeout : int, optional
The timeout in seconds for the request to errbit (the default is no timeout)

This Page