This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added support to @opbeat awesome error tracking and metrics
- Loading branch information
1 parent
170a274
commit 8d57f95
Showing
6 changed files
with
65 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# coding: utf-8 | ||
|
||
|
||
def configure(app, admin=None): | ||
if app.config.get('DEBUG_TOOLBAR_ENABLED'): | ||
try: | ||
from flask_debugtoolbar import DebugToolbarExtension | ||
DebugToolbarExtension(app) | ||
except ImportError: | ||
app.logger.info('flask_debugtoolbar is not installed') | ||
|
||
if app.config.get('OPBEAT'): | ||
try: | ||
from opbeat.contrib.flask import Opbeat | ||
Opbeat( | ||
app, | ||
logging=app.config.get('OPBEAT', {}).get('LOGGING', False) | ||
) | ||
app.logger.info('opbeat configured!!!') | ||
except ImportError: | ||
app.logger.info('opbeat is not installed') | ||
|
||
if app.config.get('SENTRY_ENABLED', False): | ||
try: | ||
from raven.contrib.flask import Sentry | ||
app.sentry = Sentry(app) | ||
except ImportError: | ||
app.logger.info('sentry, raven is not installed') |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Flask-DebugToolbar==0.10.0 | ||
ipython==4.0.1 | ||
ipdb==0.8.1 | ||
opbeat==3.1.3 |