mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Merge pull request 'optional/sentry' (#67) from saint/pyfedi:optional/sentry into main
Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/67
This commit is contained in:
commit
33ef0658ab
4 changed files with 10 additions and 0 deletions
|
@ -36,6 +36,13 @@ def create_app(config_class=Config):
|
|||
app = Flask(__name__)
|
||||
app.config.from_object(config_class)
|
||||
|
||||
if app.config['SENTRY_DSN']:
|
||||
import sentry_sdk
|
||||
sentry_sdk.init(
|
||||
dsn=app.config["SENTRY_DSN"],
|
||||
enable_tracing=True
|
||||
)
|
||||
|
||||
db.init_app(app)
|
||||
migrate.init_app(app, db, render_as_batch=True)
|
||||
login.init_app(app)
|
||||
|
|
|
@ -38,3 +38,4 @@ class Config(object):
|
|||
BOUNCE_USERNAME = os.environ.get('BOUNCE_USERNAME') or ''
|
||||
BOUNCE_PASSWORD = os.environ.get('BOUNCE_PASSWORD') or ''
|
||||
|
||||
SENTRY_DSN = os.environ.get('SENTRY_DSN') or None
|
||||
|
|
|
@ -16,3 +16,4 @@ BOUNCE_USERNAME=''
|
|||
BOUNCE_PASSWORD=''
|
||||
|
||||
FLASK_APP=pyfedi.py
|
||||
SENTRY_DSN=''
|
||||
|
|
|
@ -29,3 +29,4 @@ celery==5.3.6
|
|||
redis==5.0.1
|
||||
Werkzeug==2.3.3
|
||||
pytesseract==0.3.10
|
||||
sentry-sdk==1.40.6
|
||||
|
|
Loading…
Add table
Reference in a new issue