Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(native/unreal): Don't overwrite a previously set event level #50717

Merged
merged 6 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sentry/lang/native/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down
6 changes: 5 additions & 1 deletion tests/symbolicator/test_minidump_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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(
Expand Down