Beispiel #1
0
 def wrapper(*args, **kwargs):
     try:
         return f(*args, **kwargs)
     except Exception:
         get_client().captureException(extra={
             "args": args,
             "kwargs": kwargs
         })
         raise
Beispiel #2
0
 def wrapper(*args, **kwargs):
     try:
         return f(*args, **kwargs)
     except:
         get_client().captureException(extra={
             'args': args,
             'kwargs': kwargs
         })
         raise
Beispiel #3
0
    def from_crawler(cls, crawler, client=None, dsn=None):
        dsn = crawler.settings.get("SENTRY_DSN", None)
        client = get_client(dsn)
        o = cls(dsn=dsn)

        sentry_signals = crawler.settings.get("SENTRY_SIGNALS", {})

        for signal_name in sentry_signals:
            signal = getattr(signals, signal_name, None)
            receiver_fn = getattr(o, signal_name, None)

            if not (signal and receiver_fn):
                continue

            crawler.signals.connect(receiver_fn, signal=signal)

        return o