Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Jan 17, 2024

The usage of this was not really working well to begin with, and even worse with the new functional integrations. Because if the user adds the integration themselves (e.g. integrations: [new RewriteFrames()]), it will not actually get the correct iteratee at all.

Overall it is much cleaner anyhow to just fork the integrations properly and use them instead of the default one - then we can rely on the standard behavior of merging integrations etc.

We need to do the same for basically all usages of addOrUpdateIntegration, as that actually does not work at all anymore with the functional integrations 😬 (and in many instances never really worked properly if users passed in a custom integration themselves).

@mydea mydea requested review from AbhiPrasad, Lms24 and lforst January 17, 2024 15:29
@mydea mydea self-assigned this Jan 17, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.62 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.88 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.77 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.52 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.89 KB (0%)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.16 KB (0%)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.16 KB (0%)
@sentry/browser - Webpack (gzipped) 22.51 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 75.21 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 66.83 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.68 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.23 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 210.56 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 98.54 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 72.52 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.73 KB (0%)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 69.3 KB (0%)
@sentry/react - Webpack (gzipped) 22.55 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.98 KB (+0.11% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.24 KB (+0.47% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.14 KB (0%)

@mydea mydea force-pushed the fn/nextjs-rewrite-frames branch from 99d942f to ca1a2b9 Compare January 17, 2024 16:10
@mydea mydea changed the title fix(next): Fix custom RewriteFrames integration fix(next): Fix custom integrations Jan 17, 2024
if (options.defaultIntegrations === undefined) {
options.defaultIntegrations = sdkDefaultIntegrations;
}
options.defaultIntegrations =
Copy link
Member Author

Choose a reason for hiding this comment

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

Aligning this with e.g. the node SDK - otherwise, the RequestData() integration is not added to the defaults if somebody extends this (like in nextjs).

@mydea mydea force-pushed the fn/nextjs-rewrite-frames branch 2 times, most recently from 31298a3 to d113796 Compare January 18, 2024 13:49
@mydea
Copy link
Member Author

mydea commented Jan 18, 2024

Tests here are failing because of #10243, once this is merged we can fix this.

@AbhiPrasad
Copy link
Member

adding merge commit so we can include with next release

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) January 18, 2024 18:49
@mydea mydea force-pushed the fn/nextjs-rewrite-frames branch from 75e43af to 4c6baed Compare January 19, 2024 09:01
The usage of this was not really working well to begin with, and even worse with the new functional integrations.
@mydea mydea force-pushed the fn/nextjs-rewrite-frames branch from 4c6baed to 2d1607e Compare January 19, 2024 11:37
@AbhiPrasad AbhiPrasad merged commit 4c0481b into develop Jan 19, 2024
@AbhiPrasad AbhiPrasad deleted the fn/nextjs-rewrite-frames branch January 19, 2024 11:48
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.

5 participants