Skip to content

Commit

Permalink
fix(js): Add note about tree shaking relevance (#10573)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Jul 5, 2024
1 parent 708a42c commit 982e2eb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/platforms/javascript/common/configuration/tree-shaking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ sentryPlugin({
// other config
bundleSizeOptimizations: {
excludeDebugStatements: true,
// Only relevant if you added `browserTracingIntegration`
excludePerformanceMonitoring: true,
// Only relevant if you added `replayIntegration`
excludeReplayIframe: true,
excludeReplayShadowDom: true,
excludeReplayWorker: true,
Expand Down Expand Up @@ -120,20 +122,24 @@ Replacing this flag with `false` will tree shake any SDK code that's related to
`__SENTRY_TRACING__` must not be replaced with `false` when you're using any tracing-related SDK features (for example,`Sentry.startTransaction()`). This flag is intended to be used in combination with packages like `@sentry/next` or `@sentry/sveltekit`, which automatically include the tracing functionality.
</Note>

<PlatformCategorySection supported={['browser']}>
This has no effect if you did not add `browserTracingIntegration`.
</PlatformCategorySection>

<PlatformCategorySection supported={['browser']}>
<PlatformSection notSupported={["javascript.wasm", "javascript.cordova", "javascript.bun", "javascript.deno"]}>

`__RRWEB_EXCLUDE_IFRAME__`

Replacing this flag with `true` will tree shake any SDK code related to capturing iframe content with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any iframes.
Replacing this flag with `true` will tree shake any SDK code related to capturing iframe content with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any iframes. This has no effect if you did not add `replayIntegration`.

`__RRWEB_EXCLUDE_SHADOW_DOM__`

Replacing this flag with `true` will tree shake any SDK code related to capturing shadow dom elements with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any shadow dom elements.
Replacing this flag with `true` will tree shake any SDK code related to capturing shadow dom elements with Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you don't want to record any shadow dom elements. This has no effect if you did not add `replayIntegration`.

`__SENTRY_EXCLUDE_REPLAY_WORKER__`

Replacing this flag with `true` will tree shake any SDK code that's related to the included compression web worker for Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you want to host a compression worker yourself. See <PlatformLink to="/session-replay/configuration/#using-a-custom-compression-worker">Using a Custom Compression Worker</PlatformLink> for details. **We don't recommend enabling this flag unless you provide a custom worker URL.**
Replacing this flag with `true` will tree shake any SDK code that's related to the included compression web worker for Session Replay. It's only relevant when using <PlatformLink to="/session-replay">Session Replay</PlatformLink>. Enable this flag if you want to host a compression worker yourself. See <PlatformLink to="/session-replay/configuration/#using-a-custom-compression-worker">Using a Custom Compression Worker</PlatformLink> for details. **We don't recommend enabling this flag unless you provide a custom worker URL.** This has no effect if you did not add `replayIntegration`.

</PlatformSection>
</PlatformCategorySection>
Expand Down

0 comments on commit 982e2eb

Please sign in to comment.