Skip to content

Commit 3271c86

Browse files
authored
fix(js/browser): Amend user IP + sendDefaultPii change to v10 migration guide (#14609)
Mentions a fix to be introduced in [10.4.0](getsentry/sentry-javascript#17364) in the migration guide given it has quite a lot of impact, albeit belated (should have been like this since v9). This change is now mentioned in: - 10.4.0 changelog - in-repo migration guide - in-docs migration guide (this PR)
1 parent 22a4b3a commit 3271c86

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/platforms/javascript/common/migration/v9-to-v10.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,29 @@ The removal entails **no breaking API changes**. However, in rare cases, you mig
5757

5858
The `_experiments.autoFlushOnFeedback` option was removed and is now the default behavior.
5959

60+
## Update: User IP Address collection gated by `sendDefaultPii`
61+
62+
Version `10.4.0` introduced a change that should have ideally been introduced with `10.0.0` of the SDK.
63+
Originally destined for [version `9.0.0`](https://docs.sentry.io/platforms/javascript/migration/v8-to-v9/#behavior-changes), but having not the desired effect until v10,
64+
SDKs will now control IP address inference of user IP addresses depending on the value of the top level `sendDefaultPii` init option.
65+
66+
- If `sendDefaultPii` is `true`, Sentry will infer the IP address of users' devices to events (errors, traces, replays, etc) in all browser-based SDKs.
67+
- If `sendDefaultPii` is `false` or not set, Sentry will not infer or collect IP address data.
68+
69+
Given that this was already [advertised behaviour](https://docs.sentry.io/platforms/javascript/data-management/data-collected/#users-ip-address-and-location) since v9,
70+
we classify the change [as a fix](https://github.com/getsentry/sentry-javascript/pull/17364), though we recognize the potential impact of it.
71+
72+
If you want to continue receiving user IP addresses, set `sendDefaultPii: true` in your `Sentry.init` config:
73+
74+
```js
75+
Sentry.init({
76+
// ...
77+
sendDefaultPii: true,
78+
});
79+
```
80+
81+
We apologize for any inconvenience caused.
82+
6083
</PlatformCategorySection>
6184

6285
## Removed APIs

0 commit comments

Comments
 (0)