Skip to content

Commit 6c37df1

Browse files
authored
doc(migration): Add entry for interactionsSampleRate (#12064)
As discussed internally in Slack and #12006, we decided to remove `interactionsSampleRate` from v8 for good (it never was added in a publicly released `8.0.0*` version). This PR now updates the migration guide to retroactively reflect this change. closes #12006
1 parent bc29d88 commit 6c37df1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

MIGRATION.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,38 @@ The `BrowserTracing` integration, together with the custom routing instrumentati
647647
Instead, you should use `Sentry.browserTracingIntegration()`. See examples
648648
[below](./MIGRATION.md#deprecated-browsertracing-integration)
649649

650+
#### Removal of `interactionsSampleRate` in `browserTracingIntegration` options
651+
652+
The `interactionsSampleRate` option that could be passed to `browserTracingIntegration` or `new BrowserTracing()` was
653+
removed in v8, due to the option being redundant and in favour of bundle size minimization.
654+
655+
It's important to note that this sample rate only ever was applied when collecting INP (Interaction To Next Paint)
656+
values. You most likely don't need to replace this option. Furthermore, INP values are already sampled by the
657+
[`tracesSampleRate` SDK option](https://docs.sentry.io/platforms/javascript/configuration/options/#traces-sampler), like
658+
any regular span. At the time of writing, INP value collection does not deplete your span or transaction quota.
659+
660+
If you used `interactionsSampleRate` before, and still want to reduce INP value collection, we recommend using the
661+
`tracesSampler` SDK option instead:
662+
663+
```javascript
664+
// v7
665+
Sentry.init({
666+
integrations: [new BrowserTracing({ interactionsSampleRate: 0.1 })],
667+
});
668+
```
669+
670+
```javascript
671+
// v8 - please read the text above, you most likely don't need this :)
672+
Sentry.init({
673+
tracesSampler: (ctx) => {
674+
if (ctx.attributes?['sentry.op']?.startsWith('ui.interaction')) {
675+
return 0.1;
676+
}
677+
return 0.5;
678+
}
679+
})
680+
```
681+
650682
#### Removal of the `Offline` integration
651683
652684
The `Offline` integration has been removed in favor of the

0 commit comments

Comments
 (0)