Installing Airbrake in a Flask app
- Early access support for Airbrake Performance Monitoring
- Simple to install and configure
- Add extra context to errors before they are sent
- Set error severity and control notification thresholds
- Compatible with Airbrake On-Premise
Step 1: Install the latest version of pybrake
Airbrake for Flask uses our official Python notifier pybrake. To install run:
Step 2: Configure the Airbrake Flask middleware
Replace the placeholder
project_key values from the example
below with the real values from your project’s setting page.
Note: Flask integration uses Flask signals and therefore requires the blinker library.
Sending errors to Airbrake
try: raise ValueError('hello') except Exception as err: notifier.notify(err)
For more information, check out pybrake’s official GitHub repo.