Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Enable Celery integration in Sentry

Patryk Zawadzkib224de87c6b8
diff --git a/saleor/settings.py b/saleor/settings.py
index 4889116baf..8b836b7a0a 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -10,6 +10,7 @@ import sentry_sdk
from django.core.exceptions import ImproperlyConfigured
from django.core.management.utils import get_random_secret_key
from django_prices.utils.formatting import get_currency_fraction
+from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
@@ -498,7 +499,9 @@ DEFAULT_MENUS = {"top_menu_name": "navbar", "bottom_menu_name": "footer"}
# Sentry
SENTRY_DSN = os.environ.get("SENTRY_DSN")
if SENTRY_DSN:
- sentry_sdk.init(dsn=SENTRY_DSN, integrations=[DjangoIntegration()])
+ sentry_sdk.init(
+ dsn=SENTRY_DSN, integrations=[CeleryIntegration(), DjangoIntegration()]
+ )
GRAPHENE = {
"RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST": True,