shaonianche / running-data-sync

Nike Run Club / Runtastic Running Data Visualization
https://run.duanfei.org/
MIT License
3 stars 0 forks source link

Setup Airbrake for your Python application #178

Closed shaonianche closed 3 years ago

shaonianche commented 3 years ago

Installation

pybrake requires Python 3.4+.

pip install -U pybrake

Configuration

(You can find your project ID and API key in your project's settings)

import pybrake

notifier = pybrake.Notifier(project_id=<Your project ID>,
                            project_key='<Your project API KEY>',
                            environment='production')

Send a test error

To test that you've installed Airbrake correctly, try triggering a test error.

try:
    raise ValueError('hello')
except Exception as err:
    notifier.notify(err)

Full documentation

For more information please visit our official GitHub repo.

issue-label-bot[bot] commented 3 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.77. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.