Skip to content

Commit

Permalink
Add Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
keosak committed Jan 7, 2020
1 parent c2a515c commit 42c3804
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,19 @@
import sqlite3 as sqlite

app = Flask(__name__)
# app.debug = True
# app.config['SECRET_KEY'] = '<replace with a secret key>'
# toolbar = DebugToolbarExtension(app)

if os.environ.get('SENTRY_DSN'):
import sentry_sdk
sentry_sdk.init(
dsn=os.environ['SENTRY_DSN'],
release=os.environ.get('SENTRY_RELEASE'),
environment=os.environ.get('SENTRY_ENVIRONMENT'),
server_name=os.environ.get('SENTRY_SERVER_NAME'),
send_default_pii=True,
)

re_kind = re.compile(r'kind:([\*\w-]+)')
re_deprecated = re.compile(r'deprecated:\d')

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ wsgiref==0.1.2
Flask==1.1.1
Flask-DebugToolbar==0.10.1
Jinja2==2.10.1
sentry-sdk==0.13.5

0 comments on commit 42c3804

Please sign in to comment.