From 634efb1bb30088685d7ae54f3b0963bcd4f076cc Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 6 Jun 2021 18:44:29 +0530 Subject: added Sentry Support --- app/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/__init__.py') diff --git a/app/__init__.py b/app/__init__.py index 72aac8c..fcaddc9 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,3 +1,4 @@ +import sentry_sdk import click from flask import Flask from flask_bcrypt import Bcrypt @@ -5,9 +6,17 @@ from flask.cli import AppGroup from flask_sqlalchemy import SQLAlchemy import flask_login from flask_mailman import Mail +from sentry_sdk.integrations.flask import FlaskIntegration +from os import environ from authlib.integrations.flask_client import OAuth +sentry_sdk.init( + dsn=environ.get("SENTRY_DSN"), + integrations=[FlaskIntegration()], + traces_sample_rate=1.0 +) + app = Flask(__name__) app.config.from_object("app.config") -- cgit v1.2.3