Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Setup Airbrake for your Python application #3
pip install -U airbrake
The easiest way to get set up is with a few environment variables:
(You can find your project ID and API KEY with your project's settings):
export AIRBRAKE_API_KEY=<Your project API KEY> export AIRBRAKE_PROJECT_ID=<Your project ID> export AIRBRAKE_ENVIRONMENT=production
and you're done!
Otherwise, you can instantiate your
import airbrake logger = airbrake.getLogger(api_key="<Your project API KEY>", project_id=<Your project ID>) try: 1/0 except Exception: logger.exception("Bad math.")
For more information please visit our official GitHub repo.