Add Sentry SDK#3629
Conversation
|
Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job! |
# Conflicts: # package-lock.json
# Conflicts: # package-lock.json
|
|
||
| // pnpm uses symlinks so, let's find the target | ||
| const symlinkTarget = fs.readlinkSync( moduleFolderPnpm ); | ||
| if ( fs.existsSync( moduleFolderPnpm ) ) { |
There was a problem hiding this comment.
I noticed that the dependencies from the package.json file of Gutenberg Mobile were being resolved using the Jetpack path, so I added this condition to prevent it.
There was a problem hiding this comment.
Oh, is that related to the Sentry work here, or are you referring to "normal" dependencies? If the latter, perhaps we should bring that fix in its own PR and merge it sooner?
There was a problem hiding this comment.
I'm referring to normal dependencies (the ones we have here).
If the latter, perhaps we should bring that fix in its own PR and merge it sooner?
Sure! I'll open a new PR for this 👍 .
There was a problem hiding this comment.
Here is the PR where I'm addressing this issue.
| "dependencies": { | ||
| "email-validator": "2.0.4" | ||
| "email-validator": "2.0.4", | ||
| "@sentry/react-native": "2.4.2" |
There was a problem hiding this comment.
I had to use this specific version of the package because we have to match the dependency version of Sentry iOS SDK (reference in version 2.4.2) with the one we have in Automattic-Tracks-iOS.
antonis
left a comment
There was a problem hiding this comment.
Tested via WordPress/gutenberg#32768 (review)
The code changes LGTM too 🎉
# Conflicts: # metro.config.js # package-lock.json # package.json
gutenbergPR: WordPress/gutenberg#32768WordPress-iOSPR: wordpress-mobile/WordPress-iOS#16700Automattic-Tracks-iOSPR: Automattic/Automattic-Tracks-iOS#183This PR adds the Sentry React native SDK and customize the initialization to accomplish the following items:
beforeSendcallback to attach the same scope defined in the main apps and prevent sending events as it's determined in the main apps (code reference).NOTE: The Sentry SDK will be only enabled on iOS.
To test:
Follow the testing instructions from
gutenbergPR: WordPress/gutenberg#32768.PR submission checklist: