Enable Sentry module treeshaking
What does this MR do and why?
This change migrates the global Sentry initialization in favor of a more granular approach to settting it up.
See more at:
MRs in this change chain |
---|
Enable Sentry module treeshaking (!130677 - merged) your are here |
Upgrade sentry browser SDK to 7.66.0 (!130678 - merged) |
Adds Sentry browser performance tracing (!130713 - merged) |
Why this change?
In our next step, we will upgrade to the latest version of Sentry. In the new version the package size has increased significantly with the addition of Sentry replay
. The upgrade is happening at !130678 (merged) and I am monitoring the bundle size there as well.
Screenshots or screen recordings
before | after |
---|---|
The only difference in the configuration is the sendClientReports: true
, that is already enabled by default
How to set up and validate locally
One easy way to validate in GDK is to enable Sentry and check it gets configured in the browser console:
- Enable the feature flag:
enable_new_sentry_integration
- Visit http://gdk.test:3000/admin/application_settings/metrics_and_profiling#js-sentry-settings
- Fill the form with some dummy data, ensuring "Enable Sentry error tracking" is turned on.
- Print the following values in your console:
__SENTRY__.hub._stack[0].client._dsn
__SENTRY__.hub._stack[0].client._options
Local E2E test
I also did a manual E2E test to verify the errors are captured correctly in my GDK
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #339332 (closed)