Airbrake client for Python Flask
Project description
Installation Instruction:
pip install airbrake-flask
Code Example:
from flask import Flask, request
from airbrake import AirbrakeErrorHandler
import gevent
@app.errorhandler(500)
def internal_error(error):
if app.config['EXCEPTION_LOGGING']:
handler = AirbrakeErrorHandler(api_key=app.config['AIRBREAK_API_KEY'],
env_name=ENV,
request_url=request.url,
request_path=request.path,
request_method=request.method,
request_args=request.args,
request_headers=request.headers)
gevent.spawn(handler.emit, error)
pip install airbrake-flask
Code Example:
from flask import Flask, request
from airbrake import AirbrakeErrorHandler
import gevent
@app.errorhandler(500)
def internal_error(error):
if app.config['EXCEPTION_LOGGING']:
handler = AirbrakeErrorHandler(api_key=app.config['AIRBREAK_API_KEY'],
env_name=ENV,
request_url=request.url,
request_path=request.path,
request_method=request.method,
request_args=request.args,
request_headers=request.headers)
gevent.spawn(handler.emit, error)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
airbrake-flask-0.0.2.tar.gz
(2.2 kB
view hashes)