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

Copy context info from iOS #1884

Merged
merged 9 commits into from
Sep 1, 2022
Merged

Conversation

mattjohnsonpint
Copy link
Contributor

Like we do already for Android, we'll use a fake event (that is never sent to Sentry) to collect context information from the Cocoa SDK for iOS. (App, Device, OperatingSystem, etc.)

The context info we get back is serializably compatible with our existing contexts, so we can leverage that to hold the data.

Much of this was improving and adding tests for cloning/updating contexts. Previously we would only copy an entire key if it didn't exist. Now we will bring in any extra data we have within each key. See tests for examples.

Along the way, I found that unlike the other contexts, Runtime.Clone was accidentally made public. I've marked it obsolete, as users should not be calling that (unless we want to allow it on all context types. There's nothing special about Runtime).

@mattjohnsonpint mattjohnsonpint merged commit e646fa2 into main Sep 1, 2022
@mattjohnsonpint mattjohnsonpint deleted the contexts-and-ios-processor branch September 1, 2022 15:27
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.

None yet

2 participants