Skip to content

Conversation

leops
Copy link
Contributor

@leops leops commented Jul 1, 2025

This PR modifies how values coming from the Unreal-generated "crash context" are merged into the event object deserialized from the __sentry property. With this change, properties of the event are only written if they are not empty, to avoid overriding values that were set manually from the client SDK. This should help with issues such as #4834 by allowing clients to explicitly set the value of the os.name context and not have it be overwritten by the OsVersion emitted by Unreal. I've added an additional test case to verify that values set in the incoming event are properly preserved, but even though I didn't have to modify any existing test case I think this might be a breaking change since values that were explicitly set from the SDK will now be preserved.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@leops leops requested a review from a team as a code owner July 1, 2025 10:27
@Dav1dde
Copy link
Member

Dav1dde commented Jul 1, 2025

Hey, thanks for the PR, this seems just like a net positive, I'll just double check with the gaming team if there isn't something I am missing 👍

For the os problem in specific, that should have been (almost?) fully addressed with my PR in #4854, as we now no longer override os.name. Still the same problem exists if a user wants to override the raw description.

@Dav1dde Dav1dde enabled auto-merge July 2, 2025 08:49
@Dav1dde
Copy link
Member

Dav1dde commented Jul 2, 2025

Just added a changelog entry and switched the assertions to use an insta snapshot.

@Dav1dde Dav1dde added this pull request to the merge queue Jul 2, 2025
Merged via the queue into getsentry:master with commit f4ebadd Jul 2, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants