2021-12-30 14:05:43 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
import sentry_sdk
|
2017-11-06 13:07:21 +00:00
|
|
|
from flask import Flask
|
2021-12-30 14:05:43 +00:00
|
|
|
from sentry_sdk.integrations.flask import FlaskIntegration
|
2021-03-08 15:36:23 +00:00
|
|
|
|
2017-11-06 13:07:21 +00:00
|
|
|
from app import create_app
|
|
|
|
|
|
2021-12-30 14:05:43 +00:00
|
|
|
sentry_sdk.init(
|
|
|
|
|
dsn=os.environ['SENTRY_DSN'],
|
|
|
|
|
integrations=[FlaskIntegration()],
|
|
|
|
|
environment=os.environ['NOTIFY_ENVIRONMENT'],
|
|
|
|
|
attach_stacktrace=True,
|
|
|
|
|
traces_sample_rate=0.00005 # avoid exceeding rate limits in Production
|
|
|
|
|
)
|
|
|
|
|
sentry_sdk.set_level('error') # only record error logs or exceptions
|
|
|
|
|
|
2018-12-21 10:40:00 +00:00
|
|
|
application = Flask('app')
|
2018-11-29 14:02:20 +00:00
|
|
|
|
2018-12-21 10:40:00 +00:00
|
|
|
create_app(application)
|