"""Application.""" import ddtrace import sentry_sdk from analytics import config # In QA/Prod, library patching is performed by `--import=ddtrace.auto` in # uwsgi-start.sh. In dev/test the tracer is disabled, so patching is a no-op. if config.ENVIRONMENT not in (config.QA_ENVIRONMENT, config.PROD_ENVIRONMENT): ddtrace.tracer.enabled = False from flask_compress import Compress # noqa from analytics import ( # noqa account_handlers, api, config, handlers, participant_handlers, product_handlers, sound_recording_handlers, tiktok_handlers, ) compress = Compress() if config.SENTRY: sentry_sdk.init( dsn=config.SENTRY, enable_tracing=True, auto_session_tracking=False, traces_sample_rate=0.0, ) app = api.app compress.init_app(app)