🔇(backend) reduce noisy logs in Sentry
Ignore logs from DockerflowMiddleware and minimize unnecessary log submissions.
This commit is contained in:
committed by
aleb_the_flash
parent
e821982353
commit
9e91bbe417
@@ -19,6 +19,7 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
from configurations import Configuration, values
|
from configurations import Configuration, values
|
||||||
from sentry_sdk.integrations.django import DjangoIntegration
|
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'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
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 = sentry_sdk.get_global_scope()
|
||||||
scope.set_tag("application", "backend")
|
scope.set_tag("application", "backend")
|
||||||
|
|
||||||
|
# Ignore the logs added by the DockerflowMiddleware
|
||||||
|
ignore_logger("request.summary")
|
||||||
|
|
||||||
|
|
||||||
class Build(Base):
|
class Build(Base):
|
||||||
"""Settings used when the application is built.
|
"""Settings used when the application is built.
|
||||||
|
|||||||
Reference in New Issue
Block a user