From 56acbbba9de7161748929ee9ef14af4e4b5cbc5c Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Tue, 2 Jun 2026 13:36:17 +0200
Subject: [PATCH 1/6] docs(javascript): Document `dataCollection` option
---
.../common/configuration/options.mdx | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx
index cee6e0d4f9a505..0e233d64ca1aac 100644
--- a/docs/platforms/javascript/common/configuration/options.mdx
+++ b/docs/platforms/javascript/common/configuration/options.mdx
@@ -105,8 +105,48 @@ Set to `false` to opt out, for example, when using a custom `tunnel` or when run
+
+ `sendDefaultPii` is deprecated and will be removed in the next major version
+ (v11). Use [`dataCollection`](#dataCollection) instead.
+
+
Set this option to `true` to send default PII data to Sentry. Among other things, enabling this will enable automatic IP address collection on events.
+For backwards compatibility, `sendDefaultPii: true` behaves like enabling all [`dataCollection`](#dataCollection) categories.
+If both options are set, `dataCollection` takes precedence.
+
+
+
+
+
+
+Controls which categories of data the SDK collects automatically. All fields are optional and default to collecting rich debugging context,
+while scrubbing values whose keys match Sentry's built-in sensitive denylist (`auth`, `token`, `password`, and similar).
+User identity fields (`user.*`) and HTTP bodies are **not** collected by default.
+
+For more on what data Sentry collects and how to control it, see Data Management.
+
+| Key | Type | Default | Description |
+| --------------------- | ---------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------- |
+| `userInfo` | `boolean` | `false` | Populate `user.*` fields (`id`, `email`, `username`, `ip_address`) from instrumentation. |
+| `cookies` | `CollectBehavior` | `true` | Collect cookies. |
+| `httpHeaders` | `{ request?, response? }` | both `true` | Collect HTTP request and response headers. |
+| `httpBodies` | `HttpBodyCollectionTarget[]` | `[]` | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. |
+| `queryParams` | `CollectBehavior` | `true` | Collect URL query parameters. |
+| `genAI` | `{ inputs?, outputs? }` | both `true` | Collect generative AI input/output content. Metadata is always collected. |
+| `stackFrameVariables` | `boolean` | `true` | Capture local variable values in stack frames. |
+| `frameContextLines` | `number` | `5` | Source code lines captured around each stack frame. |
+
+The `cookies`, `httpHeaders`, and `queryParams` categories accept a `CollectBehavior` value:
+
+```typescript
+type CollectBehavior = boolean | { allow: string[] } | { deny: string[] };
+// true → collect all (sensitive denylist still scrubs values)
+// false → collect nothing
+// { deny: [] } → collect all, extending the denylist with the given terms
+// { allow: [] } → only the listed keys send their real value
+```
+
From 385960c6820fc02b0643df3e6736f7a42952e63c Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Wed, 3 Jun 2026 13:25:47 +0200
Subject: [PATCH 2/6] update "data collected" page
---
.../data-management/data-collected/index.mdx | 106 ++++++++++++++----
1 file changed, 86 insertions(+), 20 deletions(-)
diff --git a/docs/platforms/javascript/common/data-management/data-collected/index.mdx b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
index 4cfc8c4fdaa100..9f48c2874a79fb 100644
--- a/docs/platforms/javascript/common/data-management/data-collected/index.mdx
+++ b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
@@ -8,17 +8,29 @@ Sentry takes data privacy very seriously and has default settings in place that
The category types and amount of data collected vary, depending on the integrations you've enabled in the Sentry SDK. This page lists data categories that the Sentry JavaScript SDK collects.
-Many of the categories listed here require you to enable the sendDefaultPii option.
+
+
+
+
+You can control many of the categories listed here with the `dataCollection` option, which lets you opt in or out of each data category individually. The `sendDefaultPii` option is still supported, but deprecated as of version `10.54.0`.
+
+How much the SDK collects by default depends on which option you use. Without `dataCollection` (and with `sendDefaultPii` unset or `false`), the SDK collects conservatively, and the defaults described on this page apply. As soon as you pass a `dataCollection` object, the categories you don't set explicitly fall back to their `dataCollection` defaults, which are more permissive. For example, cookies, query parameters (with sensitive values scrubbed), and AI message content are then collected unless you opt out. Setting `sendDefaultPii: true` is equivalent to enabling all `dataCollection` categories. If both are set, `sendDefaultPii` is ignored.
+
+Regardless of these options, you can always scrub any data before it's sent to Sentry. See Scrubbing Sensitive Data for details.
+
+
## HTTP Headers
-By default, the Sentry SDK sends HTTP response or request headers.
+By default, the Sentry SDK sends HTTP request and response headers.
+
+Use the `dataCollection.httpHeaders` option to control this. For example, set `dataCollection: { httpHeaders: false }` to disable it, or use `{ allow: [...] }` or `{ deny: [...] }` to restrict which header values are sent. Values whose keys match Sentry's built-in sensitive denylist (such as `auth`, `token`, or `password`) are automatically scrubbed, while the keys are kept.
## Cookies
By default, the Sentry SDK doesn't send cookies.
-If you want to send cookies, set `sendDefaultPii: true` in the `Sentry.init()` call. This will send the cookie headers `Cookie` and `Set-Cookie` from fetch and XHR requests.
+To collect cookies, set `dataCollection: { cookies: true }` in the `Sentry.init()` call (or the deprecated `sendDefaultPii: true`). This sends the `Cookie` and `Set-Cookie` headers from fetch and XHR requests, scrubbing values whose keys match the sensitive denylist. You can restrict which cookies are sent using `{ allow: [...] }` or `{ deny: [...] }`.
## Information About Logged-in User
@@ -28,7 +40,7 @@ The type of logged-in user information you'll be able to send depends on the int
### Local Device User
-
+
By default, the Sentry SDK doesn't send any information about the user currently logged-in to the device where the app is running. However, you should exercise caution when logging file system errors as paths may contain the current username.
@@ -36,10 +48,23 @@ The type of logged-in user information you'll be able to send depends on the int
By default, the Sentry SDK doesn't send the user's IP address.
-To enable sending the user's IP address and infer the location, set `sendDefaultPii: true`. In some integrations such as `handleRequest` in Astro, you can send the user's IP address by enabling `trackClientIp`.
+To enable sending the user's IP address and infer the location, set `dataCollection: { userInfo: true }` (or the deprecated `sendDefaultPii: true`). This also populates the other `user.*` fields (`id`, `email`, `username`) from instrumentation. In some integrations such as `handleRequest` in Astro, you can send the user's IP address by enabling `trackClientIp`.
If sending the IP address is enabled we will try to infer the IP address or use the IP address provided by `ip_address` in `Sentry.setUser()`. If you set `ip_address: null`, the IP address won't be inferred.
+Even when this is disabled, IP addresses can still reach Sentry through collected HTTP headers, cookies, or query parameters (for example, the `X-Forwarded-For` header). If you use `dataCollection`, add these terms to the partially-matched deny lists for those categories so their values are filtered:
+
+```JavaScript
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ dataCollection: {
+ httpHeaders: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
+ cookies: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
+ queryParams: { deny: ["forwarded", "-ip", "remote-", "via", "-user"] },
+ },
+});
+```
+
## Request URL
The full request URL of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. For example, a URL like `/users/1234/details`, where `1234` is a user id (which may be considered PII).
@@ -48,18 +73,31 @@ The full request URL of outgoing and incoming HTTP requests is **always sent to
The full request query string of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. For example, a query string like `?user_id=1234`, where `1234` is a user id (which may be considered PII).
-However, Sentry has some default [server-side data scrubbing](/security-legal-pii/scrubbing/server-side-scrubbing/) in place to remove sensitive data from the query string. For example, the `apiKey` and `token` query parameters are removed by default.
+You can control query parameter collection with the `dataCollection.queryParams` option, for example `dataCollection: { queryParams: false }` to disable it. When `dataCollection` is used, query parameter values whose keys match the denylist are scrubbed before being sent. Sentry also has a built-in sensitive denylist for query parameters that scrubs values whose keys partially-match terms like `auth`, `token`, `password`, and `secret`.
+
+Sentry also has some additional [server-side data scrubbing](/security-legal-pii/scrubbing/server-side-scrubbing/) in place to remove sensitive data from the query string.
## Request Body
By default, Sentry sends the size of the body content of incoming HTTP requests. This is inferred from the `content-length` header. Sentry does not send the request body itself on the client-side.
+You can control which HTTP body types are collected with the `dataCollection.httpBodies` option. It accepts an array of body types (`"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, and `"outgoingResponse"`) and is empty (no bodies collected) by default. For example, to collect incoming and outgoing request bodies:
+
+```js
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ dataCollection: {
+ httpBodies: ["incomingRequest", "outgoingRequest"],
+ },
+});
+```
+
On the server-side, the incoming request body is captured by default. You can disable sending the incoming request body by configuring `ignoreIncomingRequestBody` in the HTTP Integration.
- If `sendDefaultPii` is enabled, you can send Form Data with `captureActionFormDataKeys` in the Remix server-side configuration.
+ If HTTP body collection is enabled (`dataCollection: { httpBodies: ['incomingRequest'] }`, or the deprecated `sendDefaultPii: true`), you can send Form Data with `captureActionFormDataKeys` in the Remix server-side configuration.
@@ -76,6 +114,17 @@ On the server-side, the
- The Sentry Electron SDK collects information about the device, such as the platform, architecture, available memory and version and build of your operating system or Linux distribution.
-
- By default, the Additional Context Integration collects dimensions and resolution of the device screen. It can optionally collect the device's manufacturer and model name if the `deviceModelManufacturer` option is enabled.
-
+ The Sentry Electron SDK collects information about the device, such as the platform, architecture, available memory and version and build of your operating system or Linux distribution.
+
+ By default, the Additional Context Integration collects dimensions and resolution of the device screen. It can optionally collect the device's manufacturer and model name if the `deviceModelManufacturer` option is enabled.
+
By default, the GPU Context Integration collects GPU information. It can optionally collect more detailed information if the `infoLevel` option is set to `complete`.
-
-
+
+
@@ -142,10 +191,6 @@ By default, the Sentry SDK sends information about the device and runtime to Sen
- ## LLM Inputs And Responses
-
- When using the Vercel AI Integration, the used prompt is sent to Sentry along with meta data like model ID and used tokens. Check out the full list of attributes [in the code](https://github.com/getsentry/sentry-javascript/blob/master/packages/node/src/integrations/tracing/vercelai/index.ts).
-
## Database Queries
By default, the Sentry SDK sends SQL queries to Sentry. The SQL queries can include PII information if the statement is not parametrized.
@@ -158,18 +203,39 @@ By default, the Sentry SDK sends information about the device and runtime to Sen
By default, the Sentry SDK doesn't send tRPC input from the tRPC context.
- If you want to send the tRPC input you can enable it by setting `sendDefaultPii: true` in the `Sentry.init()` call or by setting `attachRpcInput: true` in the `Sentry.trpcMiddleware()` options.
+ If you want to send the tRPC input you can enable it by setting `dataCollection: { userInfo: true }` (or the deprecated `sendDefaultPii: true`) in the `Sentry.init()` call, or by setting `attachRpcInput: true` in the `Sentry.trpcMiddleware()` options.
+
+
+
+
+ ## LLM Inputs And Responses
+
+ When using AI integrations, metadata like model ID and used tokens is sent to Sentry.
+
+ The content of generative AI inputs (such as prompts and tool arguments) and outputs (such as completions) might carry personal data. Whether it's recorded depends on your configuration: it's not recorded by default with `sendDefaultPii`, but when you use `dataCollection`, the `genAI` category records both inputs and outputs unless you opt out. Metadata like model ID and token counts is always collected.
+ Use the `dataCollection.genAI` option to control this. For example, opt out of recording AI message content while keeping the metadata:
+
+ ```JavaScript
+ Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+ dataCollection: {
+ genAI: {
+ inputs: false,
+ outputs: false,
+ },
+ });
+ ```
## Window Titles
-
+
The Electron Breadcrumbs Integration can optionally capture the window titles for breadcrumbs related to windows events. These can potentially contain PII so are disabled by default but can be enabled via the `captureWindowTitles` option.
## Native Crashes
-
+
At the time of a native crash, the stack of each thread is collected and sent to Sentry as part of the Minidump snapshot. This information is sent to Sentry by default, but dropped after processing the event in the backend.
These files are not stored by default, but you can [enable Minidump Storage](/platforms/native/guides/minidumps/enriching-events/attachments/#store-minidumps-as-attachments) in the Sentry organization or project settings.
From 1d2591bd98958043829cf472bbd8c48a226b9589 Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Wed, 3 Jun 2026 13:50:58 +0200
Subject: [PATCH 3/6] change all `sendDefaultPii` occurences
---
.../javascript/common/configuration/apis.mdx | 7 +++----
.../configuration/integrations/anthropic.mdx | 4 ++--
.../integrations/google-genai.mdx | 4 ++--
.../configuration/integrations/httpclient.mdx | 14 +++++++-------
.../configuration/integrations/langchain.mdx | 4 ++--
.../configuration/integrations/langgraph.mdx | 4 ++--
.../configuration/integrations/openai.mdx | 4 ++--
.../configuration/integrations/vercelai.mdx | 4 ++--
.../common/configuration/options.mdx | 1 -
.../javascript/guides/angular/manual-setup.mdx | 12 ++++++------
.../guides/aws-lambda/install/layer.mdx | 12 ++++++------
.../guides/aws-lambda/install/npm.mdx | 12 ++++++------
.../guides/azure-functions/index.mdx | 8 ++++----
docs/platforms/javascript/guides/bun/index.mdx | 6 +++---
.../guides/cloudflare/frameworks/astro.mdx | 2 +-
.../frameworks/hydrogen-react-router.mdx | 14 +++++++-------
.../cloudflare/frameworks/tanstack-start.mdx | 12 ++++++------
.../javascript/guides/cloudflare/index.mdx | 6 +++---
.../platforms/javascript/guides/deno/index.mdx | 6 +++---
.../javascript/guides/elysia/index.mdx | 12 ++++++------
.../javascript/guides/ember/index.mdx | 6 +++---
.../javascript/guides/firebase/index.mdx | 6 +++---
.../javascript/guides/gatsby/index.mdx | 6 +++---
.../platforms/javascript/guides/hono/index.mdx | 18 +++++++++---------
.../javascript/guides/nextjs/index.mdx | 15 +++++++++------
.../guides/nextjs/manual-setup/index.mdx | 12 ++++++------
.../nextjs/manual-setup/pages-router.mdx | 15 +++++++++------
.../javascript/guides/nitro/index.mdx | 6 +++---
.../javascript/guides/react-router/index.mdx | 12 ++++++------
.../guides/react-router/manual-setup.mdx | 12 ++++++------
.../javascript/guides/react/index.mdx | 6 +++---
.../javascript/guides/solid/index.mdx | 6 +++---
.../javascript/guides/solidstart/index.mdx | 12 ++++++------
.../javascript/guides/svelte/index.mdx | 6 +++---
.../tanstackstart-react/manual-setup/index.mdx | 12 ++++++------
docs/platforms/javascript/guides/vue/index.mdx | 6 +++---
36 files changed, 154 insertions(+), 150 deletions(-)
diff --git a/docs/platforms/javascript/common/configuration/apis.mdx b/docs/platforms/javascript/common/configuration/apis.mdx
index 1620d53177e765..e1ea5a3540a6a7 100644
--- a/docs/platforms/javascript/common/configuration/apis.mdx
+++ b/docs/platforms/javascript/common/configuration/apis.mdx
@@ -417,14 +417,13 @@ Sentry.setContext("character", {
On the server, the IP address will be inferred from the incoming HTTP request, if available.
- This is automatically done if you have configured `sendDefaultPii: true` in your SDK configuration.
+ This is automatically done if you have configured `dataCollection: { userInfo: true }` (or the deprecated `sendDefaultPii: true`) in your SDK configuration.
On the browser, if the users' `ip_address` is set to `"{{ auto }}"`, Sentry
- will infer the IP address from the connection between your app and Sentrys'
- server. `{{auto}}` is automatically set if you have configured `sendDefaultPii:
- true` in your SDK configuration.
+ will infer the IP address from the connection between your app and Sentry's
+ server. `{{auto}}` is automatically set if you have configured `dataCollection: { userInfo: true }` (or the deprecated `sendDefaultPii: true`) in your SDK configuration.
To ensure your users' IP addresses are never stored in your event data, you can go to your project settings, click on "Security & Privacy", and enable "Prevent Storing of IP Addresses" or use Sentry's [server-side data scrubbing](/security-legal-pii/scrubbing/) to remove `$user.ip_address`. Adding such a rule ultimately overrules any other logic.
diff --git a/docs/platforms/javascript/common/configuration/integrations/anthropic.mdx b/docs/platforms/javascript/common/configuration/integrations/anthropic.mdx
index 95dff307a22b05..5f13982165cffe 100644
--- a/docs/platforms/javascript/common/configuration/integrations/anthropic.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/anthropic.mdx
@@ -106,7 +106,7 @@ _Type: `boolean` (optional)_
Records inputs to Anthropic SDK calls (such as prompts and messages).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
#### `recordOutputs`
@@ -114,7 +114,7 @@ _Type: `boolean` (optional)_
Records outputs from Anthropic SDK calls (such as generated text and responses).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
**Usage**
diff --git a/docs/platforms/javascript/common/configuration/integrations/google-genai.mdx b/docs/platforms/javascript/common/configuration/integrations/google-genai.mdx
index 33d8fd392038a7..3d734d7243f751 100644
--- a/docs/platforms/javascript/common/configuration/integrations/google-genai.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/google-genai.mdx
@@ -102,7 +102,7 @@ _Type: `boolean` (optional)_
Records inputs to Google Gen AI SDK calls (such as prompts and messages).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
#### `recordOutputs`
@@ -110,7 +110,7 @@ _Type: `boolean` (optional)_
Records outputs from Google Gen AI SDK calls (such as generated text and responses).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
**Usage**
diff --git a/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx b/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx
index d1e819f4fdd9f4..4174a8f456e1ca 100644
--- a/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/httpclient.mdx
@@ -29,7 +29,7 @@ _Import name: `Sentry.httpClientIntegration`_
This integration captures errors on failed requests from Fetch and XHR and attaches request and response information.
-By default, error events don't contain header or cookie data. You can change this behavior by setting `sendDefaultPii: true` in your root `Sentry.init({})` config.
+By default, error events don't contain header or cookie data. You can control this with the `dataCollection` option. Set `dataCollection: { httpHeaders: true, cookies: true }` in your root `Sentry.init({})` config. The deprecated `sendDefaultPii: true` option also enables this behavior.
@@ -56,13 +56,13 @@ _Type: `(string|RegExp)[]`_
An array of request targets that should be considered, for example `['http://example.com/api/test']` would interpret any request to this URL as a failure. This array can contain Regexes, strings, or a combination of the two.
Default: `[/.*/]`
-### `sendDefaultPii`
-
-_Type: `boolean`_
+### `dataCollection`
- This option has to be specified on the root Sentry.init options, not the
- integration options!
+ This option has to be specified on the root `Sentry.init` config, not on the
+ integration!
-This option is required for capturing headers and cookies.
+Controls header and cookie collection for this integration. Use `dataCollection: { httpHeaders: true, cookies: true }` in `Sentry.init` to capture headers and cookies on failed requests. See the `dataCollection` option for the full set of controls including allow/deny lists.
+
+The deprecated `sendDefaultPii: true` option also enables this behavior.
diff --git a/docs/platforms/javascript/common/configuration/integrations/langchain.mdx b/docs/platforms/javascript/common/configuration/integrations/langchain.mdx
index 7dccf7be156fe5..8afc9fddf25c56 100644
--- a/docs/platforms/javascript/common/configuration/integrations/langchain.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/langchain.mdx
@@ -106,7 +106,7 @@ _Type: `boolean` (optional)_
Records inputs to LangChain operations (such as prompts and messages).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
#### `recordOutputs`
@@ -114,7 +114,7 @@ _Type: `boolean` (optional)_
Records outputs from LangChain operations (such as generated text and responses).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
**Usage**
diff --git a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx
index a6fea671040903..bccfd0e2157a46 100644
--- a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx
@@ -128,7 +128,7 @@ _Type: `boolean` (optional)_
Records inputs to LangGraph operations (such as messages and state data passed to the graph).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
#### `recordOutputs`
@@ -136,7 +136,7 @@ _Type: `boolean` (optional)_
Records outputs from LangGraph operations (such as generated responses, agent outputs, and final state).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
**Usage**
diff --git a/docs/platforms/javascript/common/configuration/integrations/openai.mdx b/docs/platforms/javascript/common/configuration/integrations/openai.mdx
index b6ae1b5b197e5b..9079b75661fa0f 100644
--- a/docs/platforms/javascript/common/configuration/integrations/openai.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/openai.mdx
@@ -106,7 +106,7 @@ _Type: `boolean` (optional)_
Records inputs to OpenAI SDK calls (such as prompts and messages).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
#### `recordOutputs`
@@ -114,7 +114,7 @@ _Type: `boolean` (optional)_
Records outputs from OpenAI SDK calls (such as generated text and responses).
-Defaults to `true` if `sendDefaultPii` is `true`.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), or if the deprecated `sendDefaultPii` is `true`.
**Usage**
diff --git a/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx b/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
index fa6f767d37727f..a239cc59ed526d 100644
--- a/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
+++ b/docs/platforms/javascript/common/configuration/integrations/vercelai.mdx
@@ -135,7 +135,7 @@ _Type: `boolean`_
Records inputs to the `ai` function call.
-Defaults to `true` if `sendDefaultPii` is `true` or if you explicitly set `experimental_telemetry.isEnabled` to `true` in your `ai` function callsites.
+Defaults to `true` if `dataCollection.genAI.inputs` is `true` (which is the default when using `dataCollection`), if the deprecated `sendDefaultPii` is `true`, or if you explicitly set `experimental_telemetry.isEnabled` to `true` in your `ai` function callsites.
```javascript
Sentry.init({
@@ -151,7 +151,7 @@ _Type: `boolean`_
Records outputs to the `ai` function call.
-Defaults to `true` if `sendDefaultPii` is `true` or if you explicitly set `experimental_telemetry.isEnabled` to `true` in your `ai` function callsites.
+Defaults to `true` if `dataCollection.genAI.outputs` is `true` (which is the default when using `dataCollection`), if the deprecated `sendDefaultPii` is `true`, or if you explicitly set `experimental_telemetry.isEnabled` to `true` in your `ai` function callsites.
```javascript
Sentry.init({
diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx
index 0e233d64ca1aac..3a7e53f9860541 100644
--- a/docs/platforms/javascript/common/configuration/options.mdx
+++ b/docs/platforms/javascript/common/configuration/options.mdx
@@ -119,7 +119,6 @@ If both options are set, `dataCollection` takes precedence.
-
Controls which categories of data the SDK collects automatically. All fields are optional and default to collecting rich debugging context,
while scrubbing values whose keys match Sentry's built-in sensitive denylist (`auth`, `token`, `password`, and similar).
User identity fields (`user.*`) and HTTP bodies are **not** collected by default.
diff --git a/docs/platforms/javascript/guides/angular/manual-setup.mdx b/docs/platforms/javascript/guides/angular/manual-setup.mdx
index 71d4cfc110ffff..835b35aa4687a9 100644
--- a/docs/platforms/javascript/guides/angular/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/angular/manual-setup.mdx
@@ -117,9 +117,9 @@ import * as Sentry from "@sentry/angular";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -182,9 +182,9 @@ import * as Sentry from "@sentry/angular";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx b/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
index 14fa434fd291b4..df047f153f1c75 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
@@ -73,9 +73,9 @@ const Sentry = require("@sentry/aws-serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
@@ -94,9 +94,9 @@ import * as Sentry from "@sentry/aws-serverless";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
index f01f84ba53b629..95ec0670f2be82 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
@@ -99,9 +99,9 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
@@ -134,9 +134,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
diff --git a/docs/platforms/javascript/guides/azure-functions/index.mdx b/docs/platforms/javascript/guides/azure-functions/index.mdx
index 8a41f265adf573..52d855d4fc826f 100644
--- a/docs/platforms/javascript/guides/azure-functions/index.mdx
+++ b/docs/platforms/javascript/guides/azure-functions/index.mdx
@@ -60,9 +60,9 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/azure-functions/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/azure-functions/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
@@ -119,7 +119,7 @@ module.exports = async function (context, req) {
} catch (e) {
// use Sentry.withScope to enrich the event with request data
Sentry.withScope((scope) => {
- // Attach request context (requires sendDefaultPii: true)
+ // Attach request context (requires dataCollection: { userInfo: true })
scope.setSDKProcessingMetadata({ request: req });
Sentry.captureException(e);
});
diff --git a/docs/platforms/javascript/guides/bun/index.mdx b/docs/platforms/javascript/guides/bun/index.mdx
index 14033d92933e76..eeebefaf5057b1 100644
--- a/docs/platforms/javascript/guides/bun/index.mdx
+++ b/docs/platforms/javascript/guides/bun/index.mdx
@@ -63,9 +63,9 @@ import * as Sentry from "@sentry/bun";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/bun/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/bun/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
index 4b6f128e32c1b5..de726e5455536b 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
@@ -100,7 +100,7 @@ export const onRequest = [
// Make sure Sentry is the first middleware
Sentry.sentryPagesPlugin((context) => ({
dsn: "___PUBLIC_DSN___",
- sendDefaultPii: true,
+ dataCollection: { userInfo: true },
tracesSampleRate: 1.0,
})),
// Add more middlewares here
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
index e5830344f334c4..c8be1b0b5bfc92 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
@@ -85,9 +85,9 @@ import { hydrateRoot } from "react-dom/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -164,9 +164,9 @@ import * as Sentry from "@sentry/react-router";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
@@ -218,7 +218,7 @@ export default {
// ___PRODUCT_OPTION_START___ logs
enableLogs: true,
// ___PRODUCT_OPTION_END___ logs
- sendDefaultPii: true,
+ dataCollection: { userInfo: true },
},
request: request as any,
context: executionContext,
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
index 334be9353a481d..09b111b8a96007 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
@@ -85,9 +85,9 @@ export default Sentry.withSentry(
() => ({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
@@ -153,9 +153,9 @@ export const getRouter = () => {
+ Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
-+ // Adds request headers and IP for users, for more info visit:
-+ // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
-+ sendDefaultPii: true,
++ // Sends user identity info to Sentry. For more info visit:
++ // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
++ dataCollection: { userInfo: true },
+
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/cloudflare/index.mdx b/docs/platforms/javascript/guides/cloudflare/index.mdx
index dcca422e0d87a6..a6ef9755417d3c 100644
--- a/docs/platforms/javascript/guides/cloudflare/index.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/index.mdx
@@ -95,9 +95,9 @@ export const onRequest = [
Sentry.sentryPagesPlugin((context) => ({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/deno/index.mdx b/docs/platforms/javascript/guides/deno/index.mdx
index 0dae5e22de8385..ccf3c6363bf9c7 100644
--- a/docs/platforms/javascript/guides/deno/index.mdx
+++ b/docs/platforms/javascript/guides/deno/index.mdx
@@ -69,9 +69,9 @@ import * as Sentry from "___SDK_PACKAGE___";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/deno/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/deno/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/elysia/index.mdx b/docs/platforms/javascript/guides/elysia/index.mdx
index 3e854616aa8950..0bbc3f9aff839c 100644
--- a/docs/platforms/javascript/guides/elysia/index.mdx
+++ b/docs/platforms/javascript/guides/elysia/index.mdx
@@ -85,9 +85,9 @@ import { Elysia } from "elysia";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
@@ -117,9 +117,9 @@ import { node } from "@elysiajs/node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/ember/index.mdx b/docs/platforms/javascript/guides/ember/index.mdx
index 6e2684a58b58fb..5406489a00ef5f 100644
--- a/docs/platforms/javascript/guides/ember/index.mdx
+++ b/docs/platforms/javascript/guides/ember/index.mdx
@@ -68,9 +68,9 @@ import * as Sentry from "@sentry/ember";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/ember/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/ember/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ session-replay
integrations: [
diff --git a/docs/platforms/javascript/guides/firebase/index.mdx b/docs/platforms/javascript/guides/firebase/index.mdx
index c3b01787ff050a..7979bea3bb8384 100644
--- a/docs/platforms/javascript/guides/firebase/index.mdx
+++ b/docs/platforms/javascript/guides/firebase/index.mdx
@@ -101,9 +101,9 @@ const Sentry = require("@sentry/node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/firebase/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/firebase/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate
diff --git a/docs/platforms/javascript/guides/gatsby/index.mdx b/docs/platforms/javascript/guides/gatsby/index.mdx
index 1d4289a703a093..c47ad0bf685c84 100644
--- a/docs/platforms/javascript/guides/gatsby/index.mdx
+++ b/docs/platforms/javascript/guides/gatsby/index.mdx
@@ -119,9 +119,9 @@ import * as Sentry from "@sentry/gatsby";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/gatsby/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/gatsby/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/hono/index.mdx b/docs/platforms/javascript/guides/hono/index.mdx
index 99f86b83b2ea6b..0ea5eb6f936215 100644
--- a/docs/platforms/javascript/guides/hono/index.mdx
+++ b/docs/platforms/javascript/guides/hono/index.mdx
@@ -170,9 +170,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
@@ -251,9 +251,9 @@ app.use(
sentry(app, {
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
@@ -297,9 +297,9 @@ app.use(
sentry(app, {
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/nextjs/index.mdx b/docs/platforms/javascript/guides/nextjs/index.mdx
index c5a594ed3a87db..34f0a0d94e859d 100644
--- a/docs/platforms/javascript/guides/nextjs/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/index.mdx
@@ -62,8 +62,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
@@ -88,8 +89,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
@@ -105,8 +107,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
index c1eab4244b2d02..f3887b8e874843 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
@@ -132,8 +132,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -176,8 +176,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -198,8 +198,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
index fba8d1ecd212c9..35bbec6e7fdb92 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
@@ -156,8 +156,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -190,8 +191,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -212,8 +214,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users
- sendDefaultPii: true,
+ // Sends user identity info to Sentry
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
diff --git a/docs/platforms/javascript/guides/nitro/index.mdx b/docs/platforms/javascript/guides/nitro/index.mdx
index a4f10b515e56eb..9d1a43af182d48 100644
--- a/docs/platforms/javascript/guides/nitro/index.mdx
+++ b/docs/platforms/javascript/guides/nitro/index.mdx
@@ -141,9 +141,9 @@ import * as Sentry from "@sentry/nitro";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/react-router/index.mdx b/docs/platforms/javascript/guides/react-router/index.mdx
index 9e04c18d6fdd14..2a1990626a035f 100644
--- a/docs/platforms/javascript/guides/react-router/index.mdx
+++ b/docs/platforms/javascript/guides/react-router/index.mdx
@@ -109,9 +109,9 @@ import { HydratedRouter } from "react-router/dom";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -194,9 +194,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/react-router/manual-setup.mdx b/docs/platforms/javascript/guides/react-router/manual-setup.mdx
index 31a700e3d0c0c8..a301a3008fbd2b 100644
--- a/docs/platforms/javascript/guides/react-router/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/react-router/manual-setup.mdx
@@ -129,9 +129,9 @@ The `sentryOnError` handler integrates with React Router's [`onError` hook](http
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
-+ // Adds request headers and IP for users, for more info visit:
-+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
-+ sendDefaultPii: true,
++ // Sends user identity info to Sentry. For more info visit:
++ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
++ dataCollection: { userInfo: true },
+
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
@@ -260,9 +260,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/react/index.mdx b/docs/platforms/javascript/guides/react/index.mdx
index 9e51c9a0e7d833..5867259069c22b 100644
--- a/docs/platforms/javascript/guides/react/index.mdx
+++ b/docs/platforms/javascript/guides/react/index.mdx
@@ -77,9 +77,9 @@ import * as Sentry from "@sentry/react";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/react/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/solid/index.mdx b/docs/platforms/javascript/guides/solid/index.mdx
index d514abfc4bc560..d4a0b9fd9fe42d 100644
--- a/docs/platforms/javascript/guides/solid/index.mdx
+++ b/docs/platforms/javascript/guides/solid/index.mdx
@@ -85,9 +85,9 @@ if (!DEV) {
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/solid/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/solid/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/solidstart/index.mdx b/docs/platforms/javascript/guides/solidstart/index.mdx
index 4f3b77b72fa802..4cfa9048a0af6c 100644
--- a/docs/platforms/javascript/guides/solidstart/index.mdx
+++ b/docs/platforms/javascript/guides/solidstart/index.mdx
@@ -101,9 +101,9 @@ import { mount, StartClient } from "@solidjs/start/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
// add solidRouterBrowserTracingIntegration if you're using Solid Router
@@ -168,9 +168,9 @@ import * as Sentry from "@sentry/solidstart";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/svelte/index.mdx b/docs/platforms/javascript/guides/svelte/index.mdx
index 1a3cff5ee26ded..e71baca217b0b9 100644
--- a/docs/platforms/javascript/guides/svelte/index.mdx
+++ b/docs/platforms/javascript/guides/svelte/index.mdx
@@ -78,9 +78,9 @@ import * as Sentry from "@sentry/svelte";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/svelte/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/svelte/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
index b13b6cdf384af8..9f553af49b38aa 100644
--- a/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
+++ b/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
@@ -95,9 +95,9 @@ import { hydrateRoot } from "react-dom/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ session-replay
@@ -199,9 +199,9 @@ import * as Sentry from "@sentry/tanstackstart-react";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/vue/index.mdx b/docs/platforms/javascript/guides/vue/index.mdx
index 55aa5244a64487..4870c0b902ded1 100644
--- a/docs/platforms/javascript/guides/vue/index.mdx
+++ b/docs/platforms/javascript/guides/vue/index.mdx
@@ -85,9 +85,9 @@ Sentry.init({
app,
dsn: "___PUBLIC_DSN___",
- // Adds request headers and IP for users, for more info visit:
- // https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/#sendDefaultPii
- sendDefaultPii: true,
+ // Sends user identity info to Sentry. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/#dataCollection
+ dataCollection: { userInfo: true },
integrations: [
// ___PRODUCT_OPTION_START___ performance
From bcd9543988bd83aa4c2a18705da8c4a0b96c81cc Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Wed, 3 Jun 2026 14:31:31 +0200
Subject: [PATCH 4/6] clarify cookies and query strings
---
.../common/data-management/data-collected/index.mdx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/platforms/javascript/common/data-management/data-collected/index.mdx b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
index 9f48c2874a79fb..42d8ce0a8ba260 100644
--- a/docs/platforms/javascript/common/data-management/data-collected/index.mdx
+++ b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
@@ -28,9 +28,9 @@ Use the `dataCollection.httpHeaders` option to control this. For example, set `d
## Cookies
-By default, the Sentry SDK doesn't send cookies.
+By default, the Sentry SDK doesn't send cookies. When using `dataCollection`, however, cookies are collected with sensitive values (like `token` or `key`) scrubbed. Opt out by setting `dataCollection: { cookies: false }`.
-To collect cookies, set `dataCollection: { cookies: true }` in the `Sentry.init()` call (or the deprecated `sendDefaultPii: true`). This sends the `Cookie` and `Set-Cookie` headers from fetch and XHR requests, scrubbing values whose keys match the sensitive denylist. You can restrict which cookies are sent using `{ allow: [...] }` or `{ deny: [...] }`.
+To collect cookies when not using `dataCollection`, set the deprecated `sendDefaultPii: true` in `Sentry.init()`. To disable cookie collection when using `dataCollection`, set `dataCollection: { cookies: false }`. You can also restrict which cookie values are sent using `{ allow: [...] }` or `{ deny: [...] }`.
## Information About Logged-in User
@@ -71,9 +71,9 @@ The full request URL of outgoing and incoming HTTP requests is **always sent to
## Request Query String
-The full request query string of outgoing and incoming HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. For example, a query string like `?user_id=1234`, where `1234` is a user id (which may be considered PII).
+By default, the full request query string of outgoing and incoming HTTP requests is sent to Sentry. Depending on your application, this could contain PII data. For example, a query string like `?user_id=1234`, where `1234` is a user id (which may be considered PII).
-You can control query parameter collection with the `dataCollection.queryParams` option, for example `dataCollection: { queryParams: false }` to disable it. When `dataCollection` is used, query parameter values whose keys match the denylist are scrubbed before being sent. Sentry also has a built-in sensitive denylist for query parameters that scrubs values whose keys partially-match terms like `auth`, `token`, `password`, and `secret`.
+Use the `dataCollection.queryParams` option to control this. Set it to `false` to disable collection entirely, or use `{ allow: [...] }` / `{ deny: [...] }` to filter which values are sent. When `dataCollection` is used, values whose keys match the built-in sensitive denylist (terms like `auth`, `token`, `password`, and `secret`) are scrubbed automatically.
Sentry also has some additional [server-side data scrubbing](/security-legal-pii/scrubbing/server-side-scrubbing/) in place to remove sensitive data from the query string.
From dbadb7b2ca9dd90eb23b18d4cadaccf09ae2fe54 Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Fri, 5 Jun 2026 13:45:46 +0200
Subject: [PATCH 5/6] change defaults of httpBody and userInfo collection
---
.../data-management/data-collected/index.mdx | 33 +++++++------------
.../guides/angular/manual-setup.mdx | 8 ++---
.../guides/aws-lambda/install/layer.mdx | 8 ++---
.../guides/aws-lambda/install/npm.mdx | 8 ++---
.../guides/azure-functions/index.mdx | 4 +--
.../platforms/javascript/guides/bun/index.mdx | 4 +--
.../guides/cloudflare/frameworks/astro.mdx | 4 ++-
.../frameworks/hydrogen-react-router.mdx | 11 ++++---
.../cloudflare/frameworks/tanstack-start.mdx | 8 ++---
.../javascript/guides/cloudflare/index.mdx | 4 +--
.../javascript/guides/deno/index.mdx | 4 +--
.../javascript/guides/elysia/index.mdx | 8 ++---
.../javascript/guides/ember/index.mdx | 4 +--
.../javascript/guides/firebase/index.mdx | 4 +--
.../javascript/guides/gatsby/index.mdx | 4 +--
.../javascript/guides/hono/index.mdx | 12 +++----
.../javascript/guides/nextjs/index.mdx | 18 +++++-----
.../guides/nextjs/manual-setup/index.mdx | 12 +++----
.../nextjs/manual-setup/pages-router.mdx | 18 +++++-----
.../javascript/guides/nitro/index.mdx | 4 +--
.../javascript/guides/react-router/index.mdx | 8 ++---
.../guides/react-router/manual-setup.mdx | 8 ++---
.../javascript/guides/react/index.mdx | 4 +--
.../javascript/guides/solid/index.mdx | 4 +--
.../javascript/guides/solidstart/index.mdx | 8 ++---
.../javascript/guides/svelte/index.mdx | 4 +--
.../manual-setup/index.mdx | 8 ++---
.../platforms/javascript/guides/vue/index.mdx | 4 +--
28 files changed, 111 insertions(+), 117 deletions(-)
diff --git a/docs/platforms/javascript/common/data-management/data-collected/index.mdx b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
index 42d8ce0a8ba260..9ace415eba0a66 100644
--- a/docs/platforms/javascript/common/data-management/data-collected/index.mdx
+++ b/docs/platforms/javascript/common/data-management/data-collected/index.mdx
@@ -34,9 +34,9 @@ To collect cookies when not using `dataCollection`, set the deprecated `sendDefa
## Information About Logged-in User
-By default, the Sentry SDK doesn't send any information about the logged-in user, such as email address, user ID, or username.
+When using `dataCollection`, the SDK automatically populates user identity fields (`user.id`, `user.email`, `user.username`) from instrumentation. To disable this, set `dataCollection: { userInfo: false }`.
-The type of logged-in user information you'll be able to send depends on the integrations you enable in Sentry's SDK. Most integrations won't send any user information. Some integrations (e.g. User Feedback) make it possible to send data like the user ID, username, and email address.
+Without `dataCollection` (and with `sendDefaultPii` unset or `false`), user identity fields are not sent automatically. Some integrations (e.g. User Feedback) may still send data like the user ID, username, and email address when explicitly configured.
### Local Device User
@@ -46,9 +46,9 @@ The type of logged-in user information you'll be able to send depends on the int
## Users' IP Address and Location
-By default, the Sentry SDK doesn't send the user's IP address.
+When using `dataCollection`, the SDK sends the user's IP address by default. To disable it, set `dataCollection: { userInfo: false }`.
-To enable sending the user's IP address and infer the location, set `dataCollection: { userInfo: true }` (or the deprecated `sendDefaultPii: true`). This also populates the other `user.*` fields (`id`, `email`, `username`) from instrumentation. In some integrations such as `handleRequest` in Astro, you can send the user's IP address by enabling `trackClientIp`.
+Without `dataCollection` (and with `sendDefaultPii` unset or `false`), the user's IP address is not sent. You can enable it with the deprecated `sendDefaultPii: true`. In some integrations such as `handleRequest` in Astro, the user's IP address can also be sent by enabling `trackClientIp`.
If sending the IP address is enabled we will try to infer the IP address or use the IP address provided by `ip_address` in `Sentry.setUser()`. If you set `ip_address: null`, the IP address won't be inferred.
@@ -79,9 +79,7 @@ Sentry also has some additional [server-side data scrubbing](/security-legal-pii
## Request Body
-By default, Sentry sends the size of the body content of incoming HTTP requests. This is inferred from the `content-length` header. Sentry does not send the request body itself on the client-side.
-
-You can control which HTTP body types are collected with the `dataCollection.httpBodies` option. It accepts an array of body types (`"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, and `"outgoingResponse"`) and is empty (no bodies collected) by default. For example, to collect incoming and outgoing request bodies:
+When using `dataCollection`, incoming and outgoing request bodies are collected by default. To disable body collection, set `dataCollection: { httpBodies: [] }`. You can also collect only specific body types by providing a subset: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, and `"outgoingResponse"`.
```js
Sentry.init({
@@ -92,12 +90,14 @@ Sentry.init({
});
```
+Without `dataCollection` (and with `sendDefaultPii` unset or `false`), Sentry only sends the body size inferred from the `content-length` header, not the body content itself.
+
On the server-side, the incoming request body is captured by default. You can disable sending the incoming request body by configuring `ignoreIncomingRequestBody` in the HTTP Integration.
- If HTTP body collection is enabled (`dataCollection: { httpBodies: ['incomingRequest'] }`, or the deprecated `sendDefaultPii: true`), you can send Form Data with `captureActionFormDataKeys` in the Remix server-side configuration.
+ When `dataCollection` is used, HTTP body collection is enabled by default, so Form Data can be sent with `captureActionFormDataKeys` in the Remix server-side configuration. When not using `dataCollection`, this requires the deprecated `sendDefaultPii: true`.
@@ -112,18 +112,9 @@ On the server-side, the `Sentry.trpcMiddleware()` options.
+ Without `dataCollection` (and with `sendDefaultPii` unset or `false`), tRPC input is not collected. You can still opt in per-middleware by setting `attachRpcInput: true` in the `Sentry.trpcMiddleware()` options, regardless of the global `dataCollection` setting.
diff --git a/docs/platforms/javascript/guides/angular/manual-setup.mdx b/docs/platforms/javascript/guides/angular/manual-setup.mdx
index 835b35aa4687a9..c646e88b83114f 100644
--- a/docs/platforms/javascript/guides/angular/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/angular/manual-setup.mdx
@@ -117,9 +117,9 @@ import * as Sentry from "@sentry/angular";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -182,9 +182,9 @@ import * as Sentry from "@sentry/angular";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/angular/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx b/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
index df047f153f1c75..e897df5ea3ca16 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/layer.mdx
@@ -73,9 +73,9 @@ const Sentry = require("@sentry/aws-serverless");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
@@ -94,9 +94,9 @@ import * as Sentry from "@sentry/aws-serverless";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate and adding integration
diff --git a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
index 95ec0670f2be82..12acc5a665d987 100644
--- a/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
+++ b/docs/platforms/javascript/guides/aws-lambda/install/npm.mdx
@@ -99,9 +99,9 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
@@ -134,9 +134,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/aws-lambda/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
diff --git a/docs/platforms/javascript/guides/azure-functions/index.mdx b/docs/platforms/javascript/guides/azure-functions/index.mdx
index 52d855d4fc826f..a0b417b7d73770 100644
--- a/docs/platforms/javascript/guides/azure-functions/index.mdx
+++ b/docs/platforms/javascript/guides/azure-functions/index.mdx
@@ -60,9 +60,9 @@ const { nodeProfilingIntegration } = require("@sentry/profiling-node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/azure-functions/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
diff --git a/docs/platforms/javascript/guides/bun/index.mdx b/docs/platforms/javascript/guides/bun/index.mdx
index eeebefaf5057b1..a192c29f039433 100644
--- a/docs/platforms/javascript/guides/bun/index.mdx
+++ b/docs/platforms/javascript/guides/bun/index.mdx
@@ -63,9 +63,9 @@ import * as Sentry from "@sentry/bun";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/bun/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Add Performance Monitoring by setting tracesSampleRate
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
index de726e5455536b..143cee7ea58e9a 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/astro.mdx
@@ -100,7 +100,9 @@ export const onRequest = [
// Make sure Sentry is the first middleware
Sentry.sentryPagesPlugin((context) => ({
dsn: "___PUBLIC_DSN___",
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
tracesSampleRate: 1.0,
})),
// Add more middlewares here
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
index c8be1b0b5bfc92..110d9bcf2460bc 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router.mdx
@@ -85,9 +85,9 @@ import { hydrateRoot } from "react-dom/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -164,9 +164,9 @@ import * as Sentry from "@sentry/react-router";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
@@ -218,7 +218,8 @@ export default {
// ___PRODUCT_OPTION_START___ logs
enableLogs: true,
// ___PRODUCT_OPTION_END___ logs
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below:
+ // dataCollection: { userInfo: false },
},
request: request as any,
context: executionContext,
diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
index 09b111b8a96007..1ca9e432272006 100644
--- a/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/frameworks/tanstack-start.mdx
@@ -85,9 +85,9 @@ export default Sentry.withSentry(
() => ({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
@@ -153,9 +153,9 @@ export const getRouter = () => {
+ Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
-+ // Sends user identity info to Sentry. For more info visit:
++ // To disable sending user data, uncomment the line below. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
-+ dataCollection: { userInfo: true },
++ // dataCollection: { userInfo: false },
+
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/cloudflare/index.mdx b/docs/platforms/javascript/guides/cloudflare/index.mdx
index a6ef9755417d3c..d0c770778eb0cf 100644
--- a/docs/platforms/javascript/guides/cloudflare/index.mdx
+++ b/docs/platforms/javascript/guides/cloudflare/index.mdx
@@ -95,9 +95,9 @@ export const onRequest = [
Sentry.sentryPagesPlugin((context) => ({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/deno/index.mdx b/docs/platforms/javascript/guides/deno/index.mdx
index ccf3c6363bf9c7..1a5e968d3eb226 100644
--- a/docs/platforms/javascript/guides/deno/index.mdx
+++ b/docs/platforms/javascript/guides/deno/index.mdx
@@ -69,9 +69,9 @@ import * as Sentry from "___SDK_PACKAGE___";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/deno/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/elysia/index.mdx b/docs/platforms/javascript/guides/elysia/index.mdx
index 0bbc3f9aff839c..406b956235afa4 100644
--- a/docs/platforms/javascript/guides/elysia/index.mdx
+++ b/docs/platforms/javascript/guides/elysia/index.mdx
@@ -85,9 +85,9 @@ import { Elysia } from "elysia";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
@@ -117,9 +117,9 @@ import { node } from "@elysiajs/node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/ember/index.mdx b/docs/platforms/javascript/guides/ember/index.mdx
index 5406489a00ef5f..bb8d4efd7a3035 100644
--- a/docs/platforms/javascript/guides/ember/index.mdx
+++ b/docs/platforms/javascript/guides/ember/index.mdx
@@ -68,9 +68,9 @@ import * as Sentry from "@sentry/ember";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/ember/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ session-replay
integrations: [
diff --git a/docs/platforms/javascript/guides/firebase/index.mdx b/docs/platforms/javascript/guides/firebase/index.mdx
index 7979bea3bb8384..b3a9662a702327 100644
--- a/docs/platforms/javascript/guides/firebase/index.mdx
+++ b/docs/platforms/javascript/guides/firebase/index.mdx
@@ -101,9 +101,9 @@ const Sentry = require("@sentry/node");
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/firebase/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Add Tracing by setting tracesSampleRate
diff --git a/docs/platforms/javascript/guides/gatsby/index.mdx b/docs/platforms/javascript/guides/gatsby/index.mdx
index c47ad0bf685c84..18add4ba68d4c0 100644
--- a/docs/platforms/javascript/guides/gatsby/index.mdx
+++ b/docs/platforms/javascript/guides/gatsby/index.mdx
@@ -119,9 +119,9 @@ import * as Sentry from "@sentry/gatsby";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/gatsby/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/hono/index.mdx b/docs/platforms/javascript/guides/hono/index.mdx
index 0ea5eb6f936215..dd75903c44cfa7 100644
--- a/docs/platforms/javascript/guides/hono/index.mdx
+++ b/docs/platforms/javascript/guides/hono/index.mdx
@@ -170,9 +170,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ profiling
integrations: [nodeProfilingIntegration()],
@@ -251,9 +251,9 @@ app.use(
sentry(app, {
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
@@ -297,9 +297,9 @@ app.use(
sentry(app, {
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/nextjs/index.mdx b/docs/platforms/javascript/guides/nextjs/index.mdx
index 34f0a0d94e859d..b0dbd3061e21db 100644
--- a/docs/platforms/javascript/guides/nextjs/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/index.mdx
@@ -62,9 +62,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
@@ -89,9 +89,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
@@ -107,9 +107,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
tracesSampleRate: process.env.NODE_ENV === "development" ? 1.0 : 0.1,
// ___PRODUCT_OPTION_END___ performance
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
index f3887b8e874843..f81588d6bd7931 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup/index.mdx
@@ -132,8 +132,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -176,8 +176,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -198,8 +198,8 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
index 35bbec6e7fdb92..b0fdaae92693e1 100644
--- a/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
+++ b/docs/platforms/javascript/guides/nextjs/manual-setup/pages-router.mdx
@@ -156,9 +156,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -191,9 +191,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
@@ -214,9 +214,9 @@ import * as Sentry from "@sentry/nextjs";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry
- // https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // To disable sending user data, uncomment the line below
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#dataCollection
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Capture 100% in dev, 10% in production
diff --git a/docs/platforms/javascript/guides/nitro/index.mdx b/docs/platforms/javascript/guides/nitro/index.mdx
index 9d1a43af182d48..557745f8cda633 100644
--- a/docs/platforms/javascript/guides/nitro/index.mdx
+++ b/docs/platforms/javascript/guides/nitro/index.mdx
@@ -141,9 +141,9 @@ import * as Sentry from "@sentry/nitro";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/nitro/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/react-router/index.mdx b/docs/platforms/javascript/guides/react-router/index.mdx
index 2a1990626a035f..a60319f683297f 100644
--- a/docs/platforms/javascript/guides/react-router/index.mdx
+++ b/docs/platforms/javascript/guides/react-router/index.mdx
@@ -109,9 +109,9 @@ import { HydratedRouter } from "react-router/dom";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
@@ -194,9 +194,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/react-router/manual-setup.mdx b/docs/platforms/javascript/guides/react-router/manual-setup.mdx
index a301a3008fbd2b..59d7201555566a 100644
--- a/docs/platforms/javascript/guides/react-router/manual-setup.mdx
+++ b/docs/platforms/javascript/guides/react-router/manual-setup.mdx
@@ -129,9 +129,9 @@ The `sentryOnError` handler integrates with React Router's [`onError` hook](http
+Sentry.init({
+ dsn: "___PUBLIC_DSN___",
+
-+ // Sends user identity info to Sentry. For more info visit:
++ // To disable sending user data, uncomment the line below. For more info visit:
+ // https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
-+ dataCollection: { userInfo: true },
++ // dataCollection: { userInfo: false },
+
+ integrations: [
+ // ___PRODUCT_OPTION_START___ performance
@@ -260,9 +260,9 @@ import { nodeProfilingIntegration } from "@sentry/profiling-node";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react-router/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/react/index.mdx b/docs/platforms/javascript/guides/react/index.mdx
index 5867259069c22b..97c8be0b9b9465 100644
--- a/docs/platforms/javascript/guides/react/index.mdx
+++ b/docs/platforms/javascript/guides/react/index.mdx
@@ -77,9 +77,9 @@ import * as Sentry from "@sentry/react";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/solid/index.mdx b/docs/platforms/javascript/guides/solid/index.mdx
index d4a0b9fd9fe42d..85fafcacb4d395 100644
--- a/docs/platforms/javascript/guides/solid/index.mdx
+++ b/docs/platforms/javascript/guides/solid/index.mdx
@@ -85,9 +85,9 @@ if (!DEV) {
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/solid/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/solidstart/index.mdx b/docs/platforms/javascript/guides/solidstart/index.mdx
index 4cfa9048a0af6c..f8eb751f7a0b3a 100644
--- a/docs/platforms/javascript/guides/solidstart/index.mdx
+++ b/docs/platforms/javascript/guides/solidstart/index.mdx
@@ -101,9 +101,9 @@ import { mount, StartClient } from "@solidjs/start/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
// add solidRouterBrowserTracingIntegration if you're using Solid Router
@@ -168,9 +168,9 @@ import * as Sentry from "@sentry/solidstart";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ performance
// Set tracesSampleRate to 1.0 to capture 100%
diff --git a/docs/platforms/javascript/guides/svelte/index.mdx b/docs/platforms/javascript/guides/svelte/index.mdx
index e71baca217b0b9..c33a10af19bb32 100644
--- a/docs/platforms/javascript/guides/svelte/index.mdx
+++ b/docs/platforms/javascript/guides/svelte/index.mdx
@@ -78,9 +78,9 @@ import * as Sentry from "@sentry/svelte";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/svelte/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
diff --git a/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx b/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
index 9f553af49b38aa..3a32f8eecd175c 100644
--- a/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
+++ b/docs/platforms/javascript/guides/tanstackstart-react/manual-setup/index.mdx
@@ -95,9 +95,9 @@ import { hydrateRoot } from "react-dom/client";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ session-replay
@@ -199,9 +199,9 @@ import * as Sentry from "@sentry/tanstackstart-react";
Sentry.init({
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
// ___PRODUCT_OPTION_START___ logs
// Enable logs to be sent to Sentry
diff --git a/docs/platforms/javascript/guides/vue/index.mdx b/docs/platforms/javascript/guides/vue/index.mdx
index 4870c0b902ded1..619fe0c4c941ec 100644
--- a/docs/platforms/javascript/guides/vue/index.mdx
+++ b/docs/platforms/javascript/guides/vue/index.mdx
@@ -85,9 +85,9 @@ Sentry.init({
app,
dsn: "___PUBLIC_DSN___",
- // Sends user identity info to Sentry. For more info visit:
+ // To disable sending user data, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/vue/configuration/options/#dataCollection
- dataCollection: { userInfo: true },
+ // dataCollection: { userInfo: false },
integrations: [
// ___PRODUCT_OPTION_START___ performance
From 513a0901552d00220e9c354c79b9e27079d86f49 Mon Sep 17 00:00:00 2001
From: s1gr1d <32902192+s1gr1d@users.noreply.github.com>
Date: Fri, 5 Jun 2026 13:50:20 +0200
Subject: [PATCH 6/6] update options with new defaults
---
.../common/configuration/options.mdx | 25 +++++++++----------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/docs/platforms/javascript/common/configuration/options.mdx b/docs/platforms/javascript/common/configuration/options.mdx
index 3a7e53f9860541..0bb6927984d4d9 100644
--- a/docs/platforms/javascript/common/configuration/options.mdx
+++ b/docs/platforms/javascript/common/configuration/options.mdx
@@ -119,22 +119,21 @@ If both options are set, `dataCollection` takes precedence.
-Controls which categories of data the SDK collects automatically. All fields are optional and default to collecting rich debugging context,
-while scrubbing values whose keys match Sentry's built-in sensitive denylist (`auth`, `token`, `password`, and similar).
-User identity fields (`user.*`) and HTTP bodies are **not** collected by default.
+Controls which categories of data the SDK collects automatically. All fields are optional.
+ By default the SDK collects rich debugging context (including user identity, request/response bodies, and generative AI content) and scrubs values whose keys match the built-in sensitive denylist (`auth`, `token`, `password`, and similar).
For more on what data Sentry collects and how to control it, see Data Management.
-| Key | Type | Default | Description |
-| --------------------- | ---------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------- |
-| `userInfo` | `boolean` | `false` | Populate `user.*` fields (`id`, `email`, `username`, `ip_address`) from instrumentation. |
-| `cookies` | `CollectBehavior` | `true` | Collect cookies. |
-| `httpHeaders` | `{ request?, response? }` | both `true` | Collect HTTP request and response headers. |
-| `httpBodies` | `HttpBodyCollectionTarget[]` | `[]` | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. |
-| `queryParams` | `CollectBehavior` | `true` | Collect URL query parameters. |
-| `genAI` | `{ inputs?, outputs? }` | both `true` | Collect generative AI input/output content. Metadata is always collected. |
-| `stackFrameVariables` | `boolean` | `true` | Capture local variable values in stack frames. |
-| `frameContextLines` | `number` | `5` | Source code lines captured around each stack frame. |
+| Key | Type | Default | Description |
+| --------------------- | ---------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
+| `userInfo` | `boolean` | `true` | Populate `user.*` fields (`id`, `email`, `username`, `ip_address`) from instrumentation. |
+| `cookies` | `CollectBehavior` | `true` | Collect cookies. |
+| `httpHeaders` | `{ request?, response? }` | both `true`| Collect HTTP request and response headers. |
+| `httpBodies` | `HttpBodyCollectionTarget[]` | all types | Body types to collect: `"incomingRequest"`, `"outgoingRequest"`, `"incomingResponse"`, `"outgoingResponse"`. Set to `[]` to disable. |
+| `queryParams` | `CollectBehavior` | `true` | Collect URL query parameters. |
+| `genAI` | `{ inputs?, outputs? }` | both `true`| Collect generative AI input/output content. Metadata is always collected. |
+| `stackFrameVariables` | `boolean` | `true` | Capture local variable values in stack frames. |
+| `frameContextLines` | `number` | `5` | Source code lines captured around each stack frame. |
The `cookies`, `httpHeaders`, and `queryParams` categories accept a `CollectBehavior` value: