diff --git a/docs/platforms/javascript/common/configuration/apis.mdx b/docs/platforms/javascript/common/configuration/apis.mdx index 1620d53177e76..e1ea5a3540a6a 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 95dff307a22b0..5f13982165cff 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 33d8fd392038a..3d734d7243f75 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 d1e819f4fdd9f..4174a8f456e1c 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 7dccf7be156fe..8afc9fddf25c5 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 a6fea67104090..bccfd0e2157a4 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 b6ae1b5b197e5..9079b75661fa0 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 fa6f767d37727..a239cc59ed526 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 cee6e0d4f9a50..17f257eecff1b 100644 --- a/docs/platforms/javascript/common/configuration/options.mdx +++ b/docs/platforms/javascript/common/configuration/options.mdx @@ -105,8 +105,46 @@ 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. + 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` | `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: + +```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 +``` + 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 4cfc8c4fdaa10..c45e32a147714 100644 --- a/docs/platforms/javascript/common/data-management/data-collected/index.mdx +++ b/docs/platforms/javascript/common/data-management/data-collected/index.mdx @@ -8,58 +8,97 @@ 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 data 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 is 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. +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 }`. -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 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 -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 - + 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. ## 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 `sendDefaultPii: true`. 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. +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. +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). ## 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). + +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. -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. +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. +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({ + dsn: "___PUBLIC_DSN___", + dataCollection: { + httpBodies: ["incomingRequest", "outgoingRequest"], + }, +}); +``` + +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 `sendDefaultPii` is enabled, 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`. @@ -74,7 +113,9 @@ 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 +183,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. @@ -156,20 +193,42 @@ By default, the Sentry SDK sends information about the device and runtime to Sen ## tRPC Context - By default, the Sentry SDK doesn't send tRPC input from the tRPC context. + When using `dataCollection`, tRPC input is collected by default because `httpBodies` includes `"incomingRequest"` by default. To disable it, set `dataCollection: { httpBodies: [] }` or use a list that excludes `"incomingRequest"`. + + 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. - 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. + + + + ## 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. diff --git a/docs/platforms/javascript/guides/angular/manual-setup.mdx b/docs/platforms/javascript/guides/angular/manual-setup.mdx index 71d4cfc110fff..c646e88b83114 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, + // 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: false }, 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, + // 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: 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 14fa434fd291b..e897df5ea3ca1 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, + // 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: 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___", - // 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, + // 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: 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 f01f84ba53b62..12acc5a665d98 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, + // 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: false }, // ___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, + // 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: 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 8a41f265adf57..a0b417b7d7377 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, + // 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: false }, // ___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 14033d92933e7..a192c29f03943 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, + // 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: 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 4b6f128e32c1b..143cee7ea58e9 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___", - sendDefaultPii: 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 e5830344f334c..110d9bcf2460b 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, + // 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: false }, 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, + // 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: 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 - sendDefaultPii: 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 334be9353a481..1ca9e43227200 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, + // 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: false }, // ___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, ++ // 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: 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 dcca422e0d87a..d0c770778eb0c 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, + // 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: 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 0dae5e22de838..1a5e968d3eb22 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, + // 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: 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 3e854616aa895..406b956235afa 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, + // 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: 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___", - // Adds request headers and IP for users, for more info visit: - // https://docs.sentry.io/platforms/javascript/guides/elysia/configuration/options/#sendDefaultPii - sendDefaultPii: true, + // 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: 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 6e2684a58b58f..bb8d4efd7a303 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, + // 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: 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 c3b01787ff050..b3a9662a70232 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, + // 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: 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 1d4289a703a09..18add4ba68d4c 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, + // 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: 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 99f86b83b2ea6..dd75903c44cfa 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, + // 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: false }, // ___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, + // 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: false }, // ___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, + // 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: 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 c5a594ed3a87d..b0dbd3061e21d 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, + // 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 @@ -88,8 +89,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "___PUBLIC_DSN___", - // Adds request headers and IP for users - sendDefaultPii: 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 @@ -105,8 +107,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "___PUBLIC_DSN___", - // Adds request headers and IP for users - sendDefaultPii: 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 c1eab4244b2d0..f81588d6bd793 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, + // 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___", - // Adds request headers and IP for users - sendDefaultPii: 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___", - // Adds request headers and IP for users - sendDefaultPii: 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 fba8d1ecd212c..b0fdaae92693e 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, + // 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 @@ -190,8 +191,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "___PUBLIC_DSN___", - // Adds request headers and IP for users - sendDefaultPii: 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 @@ -212,8 +214,9 @@ import * as Sentry from "@sentry/nextjs"; Sentry.init({ dsn: "___PUBLIC_DSN___", - // Adds request headers and IP for users - sendDefaultPii: 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 a4f10b515e56e..557745f8cda63 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, + // 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: 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 9e04c18d6fdd1..a60319f683297 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, + // 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: false }, 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, + // 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: 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 31a700e3d0c0c..59d7201555566 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, ++ // 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: false }, + + 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, + // 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: 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 9e51c9a0e7d83..97c8be0b9b946 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, + // 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: 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 d514abfc4bc56..85fafcacb4d39 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, + // 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: 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 4f3b77b72fa80..f8eb751f7a0b3 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, + // 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: 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___", - // Adds request headers and IP for users, for more info visit: - // https://docs.sentry.io/platforms/javascript/guides/solidstart/configuration/options/#sendDefaultPii - sendDefaultPii: true, + // 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: 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 1a3cff5ee26de..c33a10af19bb3 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, + // 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: 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 b13b6cdf384af..3a32f8eecd175 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, + // 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: false }, 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, + // 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: 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 55aa5244a6448..619fe0c4c941e 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, + // 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: false }, integrations: [ // ___PRODUCT_OPTION_START___ performance