Skip to content
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

Sentry misses some errors (due to late initialization) #1073

Open
1 task
ChristopherChudzicki opened this issue Feb 9, 2023 · 0 comments
Open
1 task

Sentry misses some errors (due to late initialization) #1073

ChristopherChudzicki opened this issue Feb 9, 2023 · 0 comments

Comments

@ChristopherChudzicki
Copy link
Contributor

ChristopherChudzicki commented Feb 9, 2023

We load many script tags on OCW pages. Here's are the tags for https://ocw.mit.edu/courses/3-091-introduction-to-solid-state-chemistry-fall-2018/:

                    <script src='https://www.youtube.com/s/player/97ea7458/www-widgetapi.vflset/www-widgetapi.js'>
                    <script src='https://script.crazyegg.com/pages/versioned/common-scripts/2e2da7d3b3b2d712690eb56715b4f237.js'>
                    <script src='https://www.youtube.com/iframe_api'>
                    <script src='https://www.googletagmanager.com/gtag/js?id=G-NWDK3DX66P&l=dataLayer&cx=c'>
                    <script src='https://script.crazyegg.com/pages/scripts/0017/3534.js'>
                    <script src='https://www.google-analytics.com/analytics.js'>
                    <script src='https://www.googletagmanager.com/gtm.js?id=GTM-NMQZ25T'>
hugo partial        <script src=''>
hugo partial       <script src=''>
                    <script src='https://w.appzi.io/boot-wt-v2200-x6ucx7.js'>
hugo partial        <script src=''>
hugo partial        <script src=''>
hugo partial        <script src=''>
SENTRY INIT HERE    <script src='https://ocw.mit.edu/static_shared/js/common.29866.js'>
                    <script src='https://ocw.mit.edu/static_shared/js/course_v2.29866.js'>
                    <script src='https://w.appzi.io/w.js?token=Tgs1d'>

When errors occur before Sentry's initialization, we do not catch them.

In the wild: A real-world example of this is errors that occur in script tags included via hugo partials. Due to a separate issue, these script tags have not been transpiling correctly to ES5. Consequently, they have been throwing errors in some browsers (e.g., all versions of IE). But we haven't been catching those errors.

Additionally: Sentry on ocw-www does not seem to initialize in IE (but does on course pages). Loading earlier might fix that issue, too.

Acceptance Criteria

  • Initialize sentry (but not the rest of the bundle) earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant