import logging import os import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.utils import BadDsn import src.routes # noqa: F401 from src.app import app # noqa: F401 logging.basicConfig(level=logging.DEBUG) sentry_dsn = os.environ.get("SENTRY_DSN") sentry_env = os.environ.get("FLASK_ENV", "development") if sentry_dsn: try: sentry_sdk.init( dsn=sentry_dsn, environment=sentry_env, integrations=[FlaskIntegration()] ) except BadDsn: pass