You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref(core): Deprecate sendDefaultPii in favor or dataCollection (#21277)
Deprecates `sendDefaultPii`.
Some `sendDefaultPii` occurences are still there as we still test
against the deprecated behavior. This will be removed in v11.
Closes#20937
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,26 @@
4
4
5
5
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
6
6
7
+
-**ref(core): Deprecate `sendDefaultPii` in favor of `dataCollection`[#21277](https://github.com/getsentry/sentry-javascript/pull/21277)**
8
+
9
+
`sendDefaultPii` is deprecated and will be removed in v11. The new `dataCollection` option lets you control each category of collected data.
10
+
`sendDefaultPii: true` still works and maps to enabling all `dataCollection` categories.
11
+
`dataCollection.userInfo` defaults to `false` and only gates auto-populated `user.*` fields (e.g. IP address from a request).
12
+
Data you set explicitly via `Sentry.setUser()` is always sent regardless.
13
+
14
+
Note that an empty `dataCollection: {}` falls back to more permissive defaults than `sendDefaultPii: false`, so replicate the old behavior by opting out explicitly:
* - `recordInputs`: Whether to record input messages/prompts (default: respects `sendDefaultPii` client option)
71
-
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
70
+
* - `recordInputs`: Whether to record input messages/prompts (default: follows `dataCollection.genAI.inputs`, or the deprecated `sendDefaultPii` option)
71
+
* - `recordOutputs`: Whether to record response text (default: follows `dataCollection.genAI.outputs`, or the deprecated `sendDefaultPii` option)
72
72
*
73
73
* ### Default Behavior
74
74
*
75
75
* By default, the integration will:
76
-
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
77
-
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
76
+
* - Record inputs and outputs based on `dataCollection.genAI` in your Sentry client options
77
+
* (or the deprecated `sendDefaultPii` option, for backwards compatibility)
78
+
* - Integration-level `recordInputs`/`recordOutputs` options take precedence over global config
78
79
*
79
80
* @example
80
81
* ```javascript
81
-
* // Record inputs and outputs when sendDefaultPii is false
82
+
* // Always record inputs and outputs regardless of global dataCollection config
* - `recordInputs`: Whether to record prompt messages (default: follows `sendDefaultPii` or `dataCollection.genAI.inputs`)
40
-
* - `recordOutputs`: Whether to record response text (default: follows `sendDefaultPii` or `dataCollection.genAI.outputs`)
39
+
* - `recordInputs`: Whether to record input messages/prompts (default: follows `dataCollection.genAI.inputs`, or the deprecated `sendDefaultPii` option)
40
+
* - `recordOutputs`: Whether to record response text (default: follows `dataCollection.genAI.outputs`, or the deprecated `sendDefaultPii` option)
41
41
*
42
42
* ### Default Behavior
43
43
*
44
44
* By default, the integration will:
45
-
* - Record inputs and outputs based on `sendDefaultPii` or `dataCollection.genAI` in your Sentry client options
45
+
* - Record inputs and outputs based on `dataCollection.genAI` in your Sentry client options
46
+
* (or the deprecated `sendDefaultPii` option, for backwards compatibility)
46
47
* - Integration-level `recordInputs`/`recordOutputs` options take precedence over global config
0 commit comments