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(core): Expose isInitialized() to replace checking via getClient #10296

Merged
merged 1 commit into from Jan 23, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Jan 23, 2024

Currently, you can use Sentry.getClient() !== undefined to check if Sentry was initialized. In v8, we want to change this so that this always returns a client (possibly a Noop client), so this check will not work anymore there. Instead, we can provide a new util that does this explicitly, where we can control what it checks under the hood.

Currently, you can use `Sentry.getClient() !== undefiend` to check if Sentry was initialized. In v8, we want to change this so that this _always_ returns a client (possibly a Noop client), so this check will not work anymore there. Instead, we can provide a new util that does this explicitly, where we can control what it checks under the hood.
@mydea mydea self-assigned this Jan 23, 2024
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 77.69 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 68.95 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 72.84 KB (0%)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 62.58 KB (0%)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 32.96 KB (0%)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.18 KB (0%)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.19 KB (0%)
@sentry/browser - Webpack (gzipped) 22.53 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 75.34 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 66.98 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 32.81 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 24.33 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 211 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 98.98 KB (+0.05% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 72.8 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 35.91 KB (+0.03% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 69.35 KB (0%)
@sentry/react - Webpack (gzipped) 22.58 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 85.97 KB (0%)
@sentry/nextjs Client - Webpack (gzipped) 50.25 KB (0%)
@sentry-internal/feedback - Webpack (gzipped) 17.14 KB (0%)

@mydea mydea merged commit 675309d into develop Jan 23, 2024
92 checks passed
@mydea mydea deleted the fn/is-initialized branch January 23, 2024 15: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.

None yet

2 participants