-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
feat: Sync RN scope to native #902
Conversation
The event.origin tag is added to the RN SDK Scope on init. On Android, we have a switch in the native beforeSend that determines where the event originated to set the tag. On iOS, the 'ios' tag is added in the native beforeSend if the event originated in the sentry-cocoa sdk Addresses #881
Native wrapper stringifies all values passed to setExtra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this landing!
I realize it's a draft but left some comments to help with direction.
Split the stringify/serialize code block into _serializeObject helper.
Also works when just supplying unknown fields and none of the default ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few nits left
I think this may have introduced some breaking changes- should the |
@cruzach Yes it does look like not checking for |
📢 Type of change
Fixes #694
📜 Description
Implemented a new class
ReactNativeScope extends Scope
that calls native scope setters equivalent methods on every call tosetUser
,addBreadcrumb
,setExtra
,setExtras
,setTag
,setTags
,setContext
,clearBreadcrumbs
.💡 Motivation and Context
Syncing the React Native scope to native events would allow users to actually group them together and see all the breadcrumbs from React Native that led to that event in native.
💚 How did you test it?
Created extensive scope assignment tests in the sample app.
📝 Checklist
🔮 Next steps