Skip to content

Commit

Permalink
Add quart to contrib (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
devdupont authored and rokob committed Feb 27, 2019
1 parent 0af4869 commit 27cce3b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions rollbar/contrib/quart/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Integration with Quart
"""

from quart import request
import rollbar


def report_exception(app, exception):
rollbar.report_exc_info(request=request)


def _hook(request, data):
data['framework'] = 'quart'

if request:
data['context'] = str(request.url_rule)

rollbar.BASE_DATA_HOOK = _hook

0 comments on commit 27cce3b

Please sign in to comment.