Files
bugsink/sentry_sdk_extensions/transport.py
Klaas van Schelven ff11b29e1b MoreLoudlyFailingTransport: avoid infinite recursion
since logger.error tries to use sentry in typical setups, using that to report
trouble with sentry is not a good idea
2025-02-17 15:31:04 +01:00

14 lines
431 B
Python

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 ...
print("Sentry SDK dropped event:", reason)