From 714b037da7fce760c19a13acaae9271cb261329d Mon Sep 17 00:00:00 2001 From: Krystof Woldrich Date: Mon, 24 Feb 2025 11:57:07 +0100 Subject: [PATCH 1/3] Add Data Collected page for React Native --- .../data-management/data-collected.mdx | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 docs/platforms/react-native/data-management/data-collected.mdx diff --git a/docs/platforms/react-native/data-management/data-collected.mdx b/docs/platforms/react-native/data-management/data-collected.mdx new file mode 100644 index 00000000000000..baa698bd02942a --- /dev/null +++ b/docs/platforms/react-native/data-management/data-collected.mdx @@ -0,0 +1,75 @@ +--- +title: Data Collected +description: "See what data is collected by the Sentry SDK." +sidebar_order: 1 +--- + +Sentry takes data privacy very seriously and has default settings in place that prioritize data safety, especially when it comes to personally identifiable information (PII) data. When you add the Sentry SDK to your application, you allow it to collect data and send it to Sentry during the runtime of your application. + +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 React Native SDK collects. + +Many of the categories listed here require you to set `sendDefaultPii: true` in your `Sentry.init({})` config. + +## HTTP Headers + +By default, the Sentry SDK attaches HTTP request information, such as URL, user-agent, referrer, and other headers, to the event. To disable this behavior, remove the `Sentry.httpContextIntegration` from the integrations array. + +Failed Fetch and XHR requests error events from `Sentry.httpClientIntegration` don't contain header or cookie data. + +To start sending headers and cookies, set `sendDefaultPii: true` in your `Sentry.init({})` config. + +## Cookies + +By default, the Sentry SDK doesn't send cookies. Sentry tries to remove any cookies that contain sensitive information, such as the Session ID and CSRF Token cookies. + +To start sending cookies, set `sendDefaultPii: true` in your `Sentry.init({})` config. + +## 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. Even if enabled, 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 will only set the user ID, but there are a few that will set the user ID, username, and email address. + +To start sending logged-in user information, set `sendDefaultPii: true` in your `Sentry.init({})` config. + +## Users' IP Addresses + +By default, the user's IP address is inferred by the Sentry backend services based on the incoming request. + +To disable sending the user's IP address, override the default value by a custom String value. + +## Request URL + +The full request URL of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Request Query String + +The full request query string of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. + +## Device Information + +By default the Sentry SDK does not send the name of the device on Android. + +If you want to send the device name, set `sendDefaultPii: true` in your `Sentry.init({})` config. + +## Console Logs + +By default, the Sentry SDK sends JS console logs to Sentry which may contain PII data. + +To disable sending console logs, set `console: false` in your `Sentry.breadcrumbsIntegration` config, see the Breadcrumbs documentation. + +## Screenshots + +The screenshot feature is disabled per default, but when enabled the screenshots may contain PII data. + +## View Hierarchy + +The view hierarchy feature is disabled per default, but when enabled the view hierarchy may contain PII data when using the `accessibilityIdentifier` property with personal information. + +## Session Replay + +By default, our Session Replay SDK masks all text content, images, webviews, and user input. This helps ensure that no sensitive data is exposed. You can find more details in the Session Replay documentation. + +## Source Context + +By default, the Sentry React Native SDK build tooling will upload only the applications' JS bundles and source maps to Sentry. To disable sources upload set `SENTRY_DISABLE_AUTO_UPLOAD=true` in your environment variables, see the Source Maps documentation. + +To opt into native source code upload enable the feature as described in the Debug Symbols documentation. From d3a7c62212ac26eb68fc1490827b7545290bc838 Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Mon, 24 Feb 2025 15:51:08 +0100 Subject: [PATCH 2/3] Update data-collected.mdx --- .../react-native/data-management/data-collected.mdx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/platforms/react-native/data-management/data-collected.mdx b/docs/platforms/react-native/data-management/data-collected.mdx index baa698bd02942a..f3b665421f188f 100644 --- a/docs/platforms/react-native/data-management/data-collected.mdx +++ b/docs/platforms/react-native/data-management/data-collected.mdx @@ -12,11 +12,13 @@ Many of the categories listed here require you to set `sendDefaultPii: true` in your `Sentry.init({})` config. -To start sending headers and cookies, set `sendDefaultPii: true` in your `Sentry.init({})` config. +## User-Agent + +By default, the Sentry SDK attaches the HTTP request User-agent to the event. To disable this behavior, remove the `Sentry.httpContextIntegration` from the integrations array. ## Cookies @@ -38,7 +40,7 @@ To disable sending the user's IP address, override the default value by a custom ## Request URL -The full request URL of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. +The full request URL and Referer of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. ## Request Query String From 005fcb3fac9116d49defcb630d3d53799f13b06c Mon Sep 17 00:00:00 2001 From: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com> Date: Tue, 25 Feb 2025 14:11:02 +0100 Subject: [PATCH 3/3] Update data-collected.mdx --- docs/platforms/react-native/data-management/data-collected.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/react-native/data-management/data-collected.mdx b/docs/platforms/react-native/data-management/data-collected.mdx index f3b665421f188f..29da347f36c245 100644 --- a/docs/platforms/react-native/data-management/data-collected.mdx +++ b/docs/platforms/react-native/data-management/data-collected.mdx @@ -36,7 +36,7 @@ To start sending logged-in user information, set