aboutsummaryrefslogtreecommitdiff
path: root/app/__init__.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2021-06-06 18:44:29 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2021-06-06 18:44:29 +0530
commit634efb1bb30088685d7ae54f3b0963bcd4f076cc (patch)
tree2420510c4cc66d14f9a7c8a3dfb21288d0ae706c /app/__init__.py
parent6a587a24a940763e0beb7fe35b5135bb2c586d2f (diff)
added Sentry Support
Diffstat (limited to 'app/__init__.py')
-rw-r--r--app/__init__.py9
1 files changed, 9 insertions, 0 deletions
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")