From 31045d13fe1948d43be6790c632c1d1362860e83 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Wed, 8 Jan 2025 15:49:29 +0100 Subject: [PATCH] Log a warning if Sentry cannot import Celery --- src/open_inwoner/conf/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/open_inwoner/conf/utils.py b/src/open_inwoner/conf/utils.py index 2356a4ad8e..b14e08f037 100644 --- a/src/open_inwoner/conf/utils.py +++ b/src/open_inwoner/conf/utils.py @@ -46,7 +46,9 @@ def get_sentry_integrations() -> list: try: from sentry_sdk.integrations import celery except DidNotEnable: # happens if the celery import fails by the integration - pass + logger.warning( + "Unable to initialize Sentry with Celery integration due to failing import" + ) else: extra.append(celery.CeleryIntegration())