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

feat: Ignore ResizeObserver and undefined error #10845

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Feb 28, 2024

We want to filter out ResizeObserver error since they are not actionable and have no stacktrace and break transaction status. ref https://stackoverflow.com/a/77680580/1139707

Also, I added to filter out undefined errors - here are two events to Sentry to represent this.

undefined:
https://sentry.sentry.io/issues/3611187513/events/46ed8c398c234ff89baee87c5c341844/

ResizeObserver:
https://sentry.sentry.io/issues/3611187513/events/48f25ea9dfbf4bd0b84a18982ee73362/

Comment on lines 185 to 186
type: 'Error',
value: 'undefined',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is a scary change, in JS you never know.
But how useful can an undefined error be?

Reason I added it is because, apparently, not all ResizeObserver has a value.

Copy link
Member

@Lms24 Lms24 Feb 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure that the undefined event is related to ResizeObserver? It might just have gotten grouped together accidentally 🤔

My concern about undefined if we're not sure is just that there could be cases where the error message is undefined (for whatever reason) but there might be a stack trace attached, making the issue more debuggable again. Suggestion: We split this PR up so we can more easily revert the undefined filter if necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call - I leave undefined away for now.

Copy link
Contributor

github-actions bot commented Feb 29, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.4 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.61 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.54 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.16 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.84 KB (+0.12% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 32.84 KB (+0.12% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.06 KB (+0.15% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.06 KB (+0.15% 🔺)
@sentry/browser - Webpack (gzipped) 22.3 KB (+0.22% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 75.83 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 67.45 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 33.28 KB (+0.08% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.79 KB (+0.15% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 211.08 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 99.81 KB (+0.07% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 74.07 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 36.35 KB (+0.1% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 68.88 KB (+0.06% 🔺)
@sentry/react - Webpack (gzipped) 22.33 KB (+0.22% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.36 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 49.69 KB (+0.08% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.09 KB (0%)

@HazAT HazAT merged commit 16ed613 into develop Mar 1, 2024
97 checks passed
@HazAT HazAT deleted the filter-resizeobserver-undefined branch March 1, 2024 08:43
Lms24 added a commit that referenced this pull request Mar 20, 2024
…ers (#11210)

Backport two additional default error event filters to our
`inboundFilters` integration:

* #10845 
* #11208
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

Successfully merging this pull request may close these issues.

3 participants