Skip to content

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

Fix sentry errors (#6902)

Filip Owczarekb91132b1acb3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4d656e9c5..ed0cf8eb8e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Refactor plugins manager(add missing tracing, optimize imports, drop plugins manager from settings) - #6890 by @fowczarek
- Add CUSTOMER_UPDATED webhook, add addresses field to customer CUSTOMER_CREATED webhook - #6898 by @piotrgrundas
- Add missing span in PluginManager - #6900 by @fowczarek
+- Fix Sentry reporting - #6902 by @fowczarek
### Breaking
- Multichannel MVP: Multicurrency - #6242 by @fowczarek @d-wysocki
diff --git a/saleor/settings.py b/saleor/settings.py
index 51a587964a..1b6b8c2c7b 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -16,6 +16,7 @@ from django.core.management.utils import get_random_secret_key
from pytimeparse import parse
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.django import DjangoIntegration
+from sentry_sdk.integrations.logging import ignore_logger
def get_list(text):
@@ -325,6 +326,9 @@ LOGGING = {
"class": "logging.StreamHandler",
"formatter": "django.server" if DEBUG else "json",
},
+ "null": {
+ "class": "logging.NullHandler",
+ },
},
"loggers": {
"django": {"level": "INFO", "propagate": True},
@@ -339,7 +343,7 @@ LOGGING = {
"level": "INFO",
"propagate": False,
},
- "graphql.execution.utils": {"propagate": False},
+ "graphql.execution.utils": {"propagate": False, "handlers": ["null"]},
},
}
@@ -496,6 +500,7 @@ if SENTRY_DSN:
sentry_sdk.init(
dsn=SENTRY_DSN, integrations=[CeleryIntegration(), DjangoIntegration()]
)
+ ignore_logger("graphql.execution.utils")
GRAPHENE = {
"RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST": True,