コード例 #1
0
def test_is_minidump():
    assert is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': 'minidump'
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': 'other'
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': None
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': None
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [None]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': []
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': None
        }
    })

    assert not is_minidump_event({
        'exception': None
    })
コード例 #2
0
def test_is_minidump():
    assert is_minidump_event(
        {"exception": {
            "values": [{
                "mechanism": {
                    "type": "minidump"
                }
            }]
        }})
    assert not is_minidump_event(
        {"exception": {
            "values": [{
                "mechanism": {
                    "type": "other"
                }
            }]
        }})
    assert not is_minidump_event(
        {"exception": {
            "values": [{
                "mechanism": {
                    "type": None
                }
            }]
        }})
    assert not is_minidump_event(
        {"exception": {
            "values": [{
                "mechanism": None
            }]
        }})
    assert not is_minidump_event({"exception": {"values": [None]}})
    assert not is_minidump_event({"exception": {"values": []}})
    assert not is_minidump_event({"exception": {"values": None}})
    assert not is_minidump_event({"exception": None})
コード例 #3
0
ファイル: test_minidump.py プロジェクト: yaoqi/sentry
def test_is_minidump():
    assert is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': 'minidump'
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': 'other'
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': {
                    'type': None
                }
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [{
                'mechanism': None
            }]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': [None]
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': []
        }
    })

    assert not is_minidump_event({
        'exception': {
            'values': None
        }
    })

    assert not is_minidump_event({
        'exception': None
    })
コード例 #4
0
ファイル: plugin.py プロジェクト: unalsurmeli/sentry
 def get_event_enhancers(self, data):
     if is_minidump_event(data):
         return [process_minidump]
     elif is_applecrashreport_event(data):
         return [process_applecrashreport]
     elif is_native_event(data):
         return [process_payload]
コード例 #5
0
ファイル: processing.py プロジェクト: winter5080/sentry
def get_symbolication_function(data):
    if is_minidump_event(data):
        return process_minidump
    elif is_applecrashreport_event(data):
        return process_applecrashreport
    elif is_native_event(data):
        return process_payload
コード例 #6
0
ファイル: error.py プロジェクト: zhouyu0615/sentry
def write_error(e, data):
    # User fixable but fatal errors are reported as processing
    # issues. We skip this for minidumps, as reprocessing is not
    # possible without persisting minidumps.
    if e.is_user_fixable and e.is_fatal and not is_minidump_event(data):
        report_processing_issue(data,
                                scope="native",
                                object="dsym:%s" % e.image_uuid,
                                type=e.type,
                                data=e.get_data())

    # This in many ways currently does not really do anything.
    # The reason is that once a processing issue is reported
    # the event will only be stored as a raw event and no
    # group will be generated.  As a result it also means that
    # we will not have any user facing event or error showing
    # up at all.  We want to keep this here though in case we
    # do not want to report some processing issues (eg:
    # optional difs)
    if e.is_user_fixable or e.is_sdk_failure:
        errors = data.setdefault("errors", [])
        errors.append(e.get_data())
    else:
        logger.debug("Failed to symbolicate with native backend",
                     exc_info=True)

    if not e.is_user_fixable:
        data.setdefault("_metrics", {})["flag.processing.error"] = True

    if e.is_fatal:
        data.setdefault("_metrics", {})["flag.processing.fatal"] = True
コード例 #7
0
    def get_event_enhancers(self, data):
        rv = []

        if is_minidump_event(data):
            rv.append(reprocess_minidump)
        if is_native_event(data):
            rv.append(process_payload)

        return rv
コード例 #8
0
ファイル: plugin.py プロジェクト: yarikc/sentry
    def get_event_enhancers(self, data):
        rv = []
        if is_minidump_event(data):
            rv.append(reprocess_minidump)

        if is_unreal_event(data):
            rv.append(reprocess_unreal_crash)

        return rv
コード例 #9
0
ファイル: plugin.py プロジェクト: nick-seward/sentry
 def get_event_enhancers(self, data):
     if is_minidump_event(data):
         return [reprocess_minidump]
コード例 #10
0
ファイル: plugin.py プロジェクト: yaoqi/sentry
 def get_event_enhancers(self, data):
     if is_minidump_event(data):
         return [reprocess_minidump]