Fail more loudly when sentry sdk experiences network troubles

This commit is contained in:
Klaas van Schelven
2024-05-24 14:47:31 +02:00
parent 4c48376b5f
commit a6123e22ac
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import logging
from sentry_sdk.transport import HttpTransport
# the lazy choice: I've already got loggers set up for bugsink; I'll just use them. Better would be: just use "sentry"
logger = logging.getLogger("bugsink.sentry")
class MoreLoudlyFailingTransport(HttpTransport):
def on_dropped_event(self, reason):
# type: (str) -> None
# ... do you thing ...
logger.error("Sentry SDK dropped event: %s", reason)