# Path: drift/flaskfactory.py
# def drift_app(app=None):
#     try:
#         return _drift_app(app=app)
#     except Exception:
#         log.exception("Flask app creation failed.")


import os
    import ddtrace
from drift.flaskfactory import drift_app
"""
Flask app with Datadog APM bootstrap.
Log level is set to 'INFO'.
"""


if os.environ.get('ENABLE_DATADOG_APM', '0') == '1':
    ddtrace.patch_all()


# Path: drift/flaskfactory.py
# def drift_app(app=None):
#     try:
#         return _drift_app(app=app)
#     except Exception:
#         log.exception("Flask app creation failed.")


# Path: drift/contrib/flask/datadogapp.py
import os
    import ddtrace
from drift.flaskfactory import drift_app

"""
Flask app with Datadog APM bootstrap.
Log level is set to 'INFO'.
"""


if os.environ.get('ENABLE_DATADOG_APM', '0') == '1':
    ddtrace.patch_all()


app = drift_app()