-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update wonder-stuff-sentry to Sentry v9 #1122
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: d602916 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1122 +/- ##
==========================================
- Coverage 99.85% 99.85% -0.01%
==========================================
Files 97 97
Lines 1392 1390 -2
Branches 358 350 -8
==========================================
- Hits 1390 1388 -2
Misses 1 1
Partials 1 1
Continue to review full report in Codecov by Sentry.
|
…th @sentry/browser@8
Size Change: -63 B (-1.36%) Total Size: 4.56 kB
ℹ️ View Unchanged
|
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
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.
Thanks for taking this on. See the epic I raised (FEI-6239) for this stuff. I think we should go straight to v9 and skip v8.
Some changes requested inline but just housekeeping really.
packages/wonder-stuff-sentry/src/__tests__/kind-error-data.test.ts
Outdated
Show resolved
Hide resolved
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.
Thanks for taking this on. See the epic I raised (FEI-6239) for this stuff. I think we should go straight to v9 and skip v8.
Some changes requested inline but just housekeeping really.
(Sorry for the double review post; finger slipped and hit request changes and I hit the other button before it finished...seems to have done both :D )
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.
question: I would expect this to be a moved file also? Is the other snapshot not deleted?
Summary:
This PR updates the
@khanacademy/wonder-stuff-sentry
package to be compatible with@sentry/browser
v8. The major difference is that in v8 and on integrations are no longer classes, simply objects. The pattern I saw in other samples is to write a function that initializes the Sentry integration with whatever options provided.The other big difference is that we no longer need to use
addGlobalEventProcessor
. In fact, that function no longer exists. In v8 though we can simplify the integration considerably by implementing theprocessEvent
hook on theIntegration
. This accomplishes pretty much exactly what thesetupOnce()
logic was doing previously (see https://github.com/getsentry/sentry-javascript/blob/5060542296ead088486e7cc2472508a595a7190b/packages/core/src/integration.ts#L121-L126).Issue: FEI-6242
Test plan:
I plan to integrate this into a consuming app and test it there to make sure the integration works. Also, all existing tests passed after updating them to the new integration (or deleting tests which no longer applied - ones relating to integration setup).