From fad34de68f0cbeaffd316c04b9716b23a2b4c166 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Mon, 17 Feb 2025 15:27:41 +0100 Subject: [PATCH] Move MoreLoudlyFailingTransport out of the default 'eat_your_own_dogfood' conf it's an extra convinience function for Bugsink developers (me), but the less stability/more ergonomics tradeoff is not right in the general case of running Bugsink (for an example of an actually materializing stability problem, see the upcoming commit) --- bugsink/settings/development.py | 7 ++++++- bugsink/utils.py | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bugsink/settings/development.py b/bugsink/settings/development.py index a104532..6043aa3 100644 --- a/bugsink/settings/development.py +++ b/bugsink/settings/development.py @@ -3,10 +3,12 @@ from .default import BASE_DIR, INSTALLED_APPS, MIDDLEWARE, LOGGING, DATABASES, I import os +from sentry_sdk_extensions.transport import MoreLoudlyFailingTransport from debug_toolbar.middleware import show_toolbar from bugsink.utils import deduce_allowed_hosts, eat_your_own_dogfood + SECRET_KEY = 'django-insecure-$@clhhieazwnxnha-_zah&(bieq%yux7#^07&xsvhn58t)8@xw' DEBUG = True @@ -52,7 +54,10 @@ DATABASES["snappea"]["NAME"] = BASE_DIR / 'snappea.sqlite3' # {PROTOCOL}://{PUBLIC_KEY}:{DEPRECATED_SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID} SENTRY_DSN = os.getenv("SENTRY_DSN") -eat_your_own_dogfood(SENTRY_DSN) +eat_your_own_dogfood( + SENTRY_DSN, + transport=MoreLoudlyFailingTransport, +) SNAPPEA = { "TASK_ALWAYS_EAGER": True, # at least for (unit) tests, this is a requirement diff --git a/bugsink/utils.py b/bugsink/utils.py index 7378269..a41c080 100644 --- a/bugsink/utils.py +++ b/bugsink/utils.py @@ -3,7 +3,6 @@ from urllib.parse import urlparse from django.core.mail import EmailMultiAlternatives from django.template.loader import get_template -from sentry_sdk_extensions.transport import MoreLoudlyFailingTransport from .version import version @@ -104,7 +103,6 @@ def eat_your_own_dogfood(sentry_dsn, **kwargs): "dsn": sentry_dsn, "traces_sample_rate": 0, "send_default_pii": True, - "transport": MoreLoudlyFailingTransport, # see (e.g.) https://github.com/getsentry/sentry-python/issues/377 for why this is necessary; I really really # dislike Sentry's silent dropping of local variables; let's see whether "just send everything" makes for