Beispiel #1
0
 def create_or_update_exception(self, rhash, host, path, method,
                                request_data, exception_name, traceback):
     model = get_exception_model()
     return model.create_or_update_entity(rhash, host, path, method,
                                          request_data, exception_name,
                                          traceback)
Beispiel #2
0
# -*- coding: utf-8 -*-
#
#    Django error tracker middleware responsible for recording exception
#
#    :copyright: 2020 Sonu Kumar
#    :license: BSD-3-Clause
#

from error_tracker.django import get_masking_module, get_context_builder, get_ticketing_module, \
    get_exception_model, get_notification_module, APP_ERROR_SUBJECT_PREFIX, APP_ERROR_EMAIL_SENDER, \
    APP_ERROR_RECIPIENT_EMAIL, TRACK_ALL_EXCEPTIONS
from error_tracker.libs.utils import get_exception_name, get_context_detail, get_notification_subject

model = get_exception_model()
ticketing = get_ticketing_module()
masking = get_masking_module()
notifier = get_notification_module()
context_builder = get_context_builder()


# noinspection PyMethodMayBeStatic
class ErrorTracker(object):
    """
     ErrorTracker class, this is responsible for capturing exceptions and
     sending notifications and taking other actions,
    """

    @staticmethod
    def _send_notification(request, message, exception, error):
        """
        Send notification to the list of entities or call the specific methods
Beispiel #3
0
 def get_exceptions(self):
     model = get_exception_model()
     return list(model.get_exceptions_per_page().items)