Skip to content

Best way to only init integrations that exist? Like if you wanted to only run Replays on certain pages? #10781

Answered by AbhiPrasad
nicholashead asked this question in Q&A
Discussion options

You must be logged in to vote

@nicholashead - we shim browserTracingIntegration and replayIntegration between our CDN bundles (via https://github.com/getsentry/sentry-javascript/tree/develop/packages/integration-shims) - you can just use the first snippet with Sentry.init and the integrations and it'll all work.

I guess only problem is that we log out this warning atm

console.warn('You are using new BrowserTracing() even though this bundle does not include tracing.');
- probably will increase noise in your console.

Curious though - what is your target bundle size? Or metric you are measuring against? How much does ad…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nicholashead
Comment options

Answer selected by nicholashead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants