Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented Oct 6, 2023

To make it easier to async add integrations later, which is useful e.g. for replay but also for other cases.

Now instead of:

const client = Sentry.getCurrentHub().getClient();
if (client && client.addIntegration) {
  client.addIntegration(new Sentry.Replay());
}

You can just do:

Sentry.addIntegration(new Sentry.Replay());

Relates to:

@mydea mydea requested review from AbhiPrasad and Lms24 October 6, 2023 08:47
@mydea mydea self-assigned this Oct 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 84.22 KB (-0.03% 🔽)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.41 KB (0%)
@sentry/browser - Webpack (gzipped) 22 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 78.78 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.6 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.01 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 254.47 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 86.75 KB (+0.11% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 62.44 KB (+0.16% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.46 KB (+0.04% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 84.25 KB (-0.03% 🔽)
@sentry/react - Webpack (gzipped) 22.05 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 102.22 KB (-0.02% 🔽)
@sentry/nextjs Client - Webpack (gzipped) 50.99 KB (-0.01% 🔽)

@mydea mydea force-pushed the fn/addIntegration branch from 6c99b72 to 553ff60 Compare October 6, 2023 12:42
To make it easier to async add integrations later, which is useful e.g. for replay but also for other cases.
@mydea mydea force-pushed the fn/addIntegration branch from 553ff60 to 29ae63c Compare October 9, 2023 10:17
@mydea mydea merged commit ec9eebc into develop Oct 9, 2023
@mydea mydea deleted the fn/addIntegration branch October 9, 2023 13:34
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