🔇(backend) reduce noisy logs in Sentry

Ignore logs from DockerflowMiddleware
and minimize unnecessary log submissions.
This commit is contained in:
lebaudantoine
2025-03-24 20:18:53 +01:00
committed by aleb_the_flash
parent e821982353
commit 9e91bbe417

View File

@@ -19,6 +19,7 @@ from django.utils.translation import gettext_lazy as _
import sentry_sdk
from configurations import Configuration, values
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.logging import ignore_logger
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -575,6 +576,9 @@ class Base(Configuration):
scope = sentry_sdk.get_global_scope()
scope.set_tag("application", "backend")
# Ignore the logs added by the DockerflowMiddleware
ignore_logger("request.summary")
class Build(Base):
"""Settings used when the application is built.