diff --git a/qgis-app/settings_docker.py b/qgis-app/settings_docker.py index 23290d50..baa1bcd8 100644 --- a/qgis-app/settings_docker.py +++ b/qgis-app/settings_docker.py @@ -165,11 +165,12 @@ # Sentry SENTRY_DSN = os.environ.get("SENTRY_DSN", "") -import sentry_sdk - -sentry_sdk.init( - dsn=SENTRY_DSN, - # Set traces_sample_rate to 1.0 to capture 100% - # of transactions for performance monitoring. - traces_sample_rate=1.0, -) +if SENTRY_DSN and SENTRY_DSN != "": + import sentry_sdk + + sentry_sdk.init( + dsn=SENTRY_DSN, + # Set traces_sample_rate to 1.0 to capture 100% + # of transactions for performance monitoring. + traces_sample_rate=1.0, + )