diff --git a/src/sentry/lang/native/processing.py b/src/sentry/lang/native/processing.py index 44b760aceca8fd..5984dd72cd68b7 100644 --- a/src/sentry/lang/native/processing.py +++ b/src/sentry/lang/native/processing.py @@ -195,7 +195,8 @@ def _merge_system_info(data, system_info): def _merge_full_response(data, response): data["platform"] = "native" - if response.get("crashed") is not None: + # Specifically for Unreal events: Do not overwrite the level as it has already been set in Relay when merging the context. + if response.get("crashed") is not None and data.get("level") is None: data["level"] = "fatal" if response["crashed"] else "info" if response.get("system_info"): diff --git a/tests/symbolicator/test_minidump_full.py b/tests/symbolicator/test_minidump_full.py index 5b7be9132fa0d6..f1ad3175f69efc 100644 --- a/tests/symbolicator/test_minidump_full.py +++ b/tests/symbolicator/test_minidump_full.py @@ -82,7 +82,10 @@ def test_full_minidump(self): "upload_file_minidump": f, "some_file": ("hello.txt", BytesIO(b"Hello World!")), }, - {"sentry[logger]": "test-logger"}, + { + "sentry[logger]": "test-logger", + "sentry[level]": "error", + }, ) candidates = event.data["debug_meta"]["images"][0]["candidates"] @@ -91,6 +94,7 @@ def test_full_minidump(self): insta_snapshot_native_stacktrace_data(self, event.data) assert event.data.get("logger") == "test-logger" + assert event.data.get("level") == "error" # assert event.data.get("extra") == {"foo": "bar"} attachments = sorted(