-
Notifications
You must be signed in to change notification settings - Fork 187
feat(mono, app, app-shell, app-shell-odd): Add Sentry support for electron apps #19569
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
base: edge
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## edge #19569 +/- ##
==========================================
- Coverage 24.81% 23.67% -1.14%
==========================================
Files 3439 3442 +3
Lines 303339 303652 +313
Branches 39884 39892 +8
==========================================
- Hits 75260 71904 -3356
- Misses 228047 231717 +3670
+ Partials 32 31 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
2fcc592 to
7834981
Compare
6bbe3c7 to
1fc93ec
Compare
1fc93ec to
60534a7
Compare
| _OT_PD_SENTRY_DEV_DSN_: JSON.stringify(process.env.OT_PD_SENTRY_DEV_DSN), | ||
| _OT_PD_SENTRY_DSN_: JSON.stringify(process.env.OT_PD_SENTRY_DSN), | ||
| _OT_PD_VERSION_: JSON.stringify(process.env.OT_PD_VERSION), | ||
| 'process.env.NODE_DEBUG': JSON.stringify(process.env.NODE_DEBUG), |
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.
For some currently unexplainable reason, we need to inject this value for the app to render properly, even though this PR did not introduce granular env injection. A lib uses this value internally.
Even more confusingly, pd and labware library e2e testing on CI only require that their respective vite.config.mts files inject this value to pass...
a7ffff4 to
60534a7
Compare
Closes EXEC-1809, EXEC-1810, and EXEC-1811
Overview
This PR adds Sentry to our electron apps. Certain commits that are more interesting are highlighted below. This work is easiest to view commit-by-commit, although note that some of the mixpanel logic is changed in later commits. Later mergebacks are done to accomodate integrating the changes introduced in #19561. See Review Requests, too.
On a high level, we use the
@sentry/electronpackage, which containsmainandrendererlibraries. These libraries contain specificintegrations, which are effectively plugins used to report certain events. Therendererlibrary contains all the sameintegrationsas the@sentry/reactpackage that we'd care about using for the browser-layer.We have two separate projects the
appandodd, and we use environmental tags ofproductionanddevelopment, which make use of the existingNODE_ENVvariable, which seems sufficient enough for our use-case. Version information (ex,8.6.0-alpha.2) is also included.8520c82 - Adding Sentry to our shell layers triggers an electron rebuild, which in turn led to failures due to some lower-level lib compatibility issues. Turns out we had some old dev webpack packages left around, so these are just cruft that need to be removed now.
bee2768 - Vite config needs some notion of whether it is a desktop or odd build target, because we keep separate sentry projects for the desktop/odd yet use the same
appfor both projects.Note that this PR has an oe-core complimentary PR. See that PR for details.
Test Plan and Hands on Testing
Changelog
Review requests
beforeSendcallback in the app'ssentry.ts. If there are any modifications that should be made to this list (or if we should filter any out from the shell layers, although they don't seem to be problematic), let me know.Risk assessment