Skip to content

Commit

Permalink
Log a warning if Sentry cannot import Celery
Browse files Browse the repository at this point in the history
  • Loading branch information
swrichards committed Jan 8, 2025
1 parent 3cc0c0c commit 31045d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/open_inwoner/conf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand Down

0 comments on commit 31045d1

Please sign in to comment.