Ejemplo n.º 1
0
    def process_view(self, request, func, args, kwargs):
        from raven.contrib.django.models import client

        try:
            self._txid = client.transaction.push(
                client.get_transaction_from_request(request)
            )
        except Exception as exc:
            client.error_logger.exception(repr(exc), extra={'request': request})

        return None
Ejemplo n.º 2
0
    def process_view(self, request, func, args, kwargs):
        from raven.contrib.django.models import client

        try:
            self._txid = client.transaction.push(
                client.get_transaction_from_request(request)
            )
        except Exception as exc:
            client.error_logger.exception(repr(exc), extra={'request': request})

        return None
Ejemplo n.º 3
0
    def process_view(self, request, func, args, kwargs):
        from raven.contrib.django.models import client

        try:
            self._txid = client.transaction.push(
                client.get_transaction_from_request(request))
        except Exception as exc:
            client.error_logger.exception(repr(exc))
        else:
            # we utilize request_finished as the exception gets reported
            # *after* process_response is executed, and thus clearing the
            # transaction there would leave it empty
            # XXX(dcramer): weakref's cause a threading issue in certain
            # versions of Django (e.g. 1.6). While they'd be ideal, we're under
            # the assumption that Django will always call our function except
            # in the situation of a process or thread dying.
            request_finished.connect(self.request_finished, weak=False)

        return None