🔇(backend) remove Sentry duplicated warning/errors
The `DockerflowMiddleware` job is to add logs, sadly the Sentry LoggingIntegration also catch these logs (at level WARNING and above) which results in an extra alert for the same purpose (the exception + the logger.error). see https://github.com/mozilla-services/Dockerflow/blob/main/docs/mozlog.md The fix is to ask Sentry to ignore this specific loggger (`request.summary`).
This commit is contained in:
@@ -8,7 +8,10 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
- 🔧(sentry) restore default integrations
|
- 🔧(sentry) restore default integrations
|
||||||
|
- 🔇(backend) remove Sentry duplicated warning/errors
|
||||||
- 👷(ci) add sharding e2e tests #467
|
- 👷(ci) add sharding e2e tests #467
|
||||||
|
|
||||||
## [1.4.1] - 2024-10-23
|
## [1.4.1] - 2024-10-23
|
||||||
|
|||||||
@@ -18,6 +18,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__)))
|
||||||
@@ -492,6 +493,9 @@ class Base(Configuration):
|
|||||||
with sentry_sdk.configure_scope() as scope:
|
with sentry_sdk.configure_scope() as scope:
|
||||||
scope.set_extra("application", "backend")
|
scope.set_extra("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