From 85555704cee850f2145ad5b2bc3afe66bfbd5e82 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Thu, 10 Sep 2020 13:26:06 +0530 Subject: added CI badge and added sentry tracking --- app/__init__.py | 11 +++++++++++ app/views.py | 3 +++ 2 files changed, 14 insertions(+) (limited to 'app') diff --git a/app/__init__.py b/app/__init__.py index dd2f7ff..7f09da5 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,5 +1,16 @@ from flask import Flask +import sentry_sdk +from sentry_sdk.integrations.flask import FlaskIntegration + +""" +sentry_sdk.init( + dsn="https://7bc9916920c041479b69db97bdb279fa@o126149.ingest.sentry.io/5424142", + integrations=[FlaskIntegration()], + traces_sample_rate=1.0 +) +""" + import configparser config = configparser.ConfigParser() config.read('config.ini') diff --git a/app/views.py b/app/views.py index 1cbc3ec..ef3c2ba 100644 --- a/app/views.py +++ b/app/views.py @@ -387,6 +387,9 @@ def send_text_file(file_name): file_dot_text = file_name + '.txt' return app.send_static_file(file_dot_text) +@app.route('/debug-sentry') +def trigger_error(): + division_by_zero = 1 / 0 @app.after_request def add_header(response): -- cgit v1.2.3