|
| 1 | +--- |
| 2 | +title: Data Collected |
| 3 | +description: "See what data is collected by the Sentry SDK." |
| 4 | +sidebar_order: 1 |
| 5 | +--- |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +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. |
| 10 | + |
| 11 | +Many of the categories listed here require you to set <PlatformLink to="/configuration/options/#send-default-pii">`sendDefaultPii: true`</PlatformLink> in your `Sentry.init({})` config. |
| 12 | + |
| 13 | +## HTTP Headers |
| 14 | + |
| 15 | +By default, failed Fetch and XHR requests error events from `Sentry.httpClientIntegration` don't contain headers. |
| 16 | + |
| 17 | +To start sending headers, set <PlatformLink to="/configuration/options/#send-default-pii">`sendDefaultPii: true`</PlatformLink> in your `Sentry.init({})` config. |
| 18 | + |
| 19 | +## User-Agent |
| 20 | + |
| 21 | +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. |
| 22 | + |
| 23 | +## Cookies |
| 24 | + |
| 25 | +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. |
| 26 | + |
| 27 | +To start sending cookies, set <PlatformLink to="/configuration/options/#send-default-pii">`sendDefaultPii: true`</PlatformLink> in your `Sentry.init({})` config. |
| 28 | + |
| 29 | +## Information About Logged-in User |
| 30 | + |
| 31 | +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. |
| 32 | + |
| 33 | +To start sending logged-in user information, set <PlatformLink to="/configuration/options/#send-default-pii">`sendDefaultPii: true`</PlatformLink> in your `Sentry.init({})` config. |
| 34 | + |
| 35 | +## Users' IP Addresses |
| 36 | + |
| 37 | +By default, the user's IP address is inferred by the Sentry backend services based on the incoming request. |
| 38 | + |
| 39 | +To disable sending the user's IP address, override the default value by a custom String value, for example by calling `Sentry.setUser({ip_address: '0.0.0.0'})`. |
| 40 | + |
| 41 | +## Request URL |
| 42 | + |
| 43 | +The full request URL and Referer of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. |
| 44 | + |
| 45 | +## Request Query String |
| 46 | + |
| 47 | +The full request query string of outgoing HTTP requests is **always sent to Sentry**. Depending on your application, this could contain PII data. |
| 48 | + |
| 49 | +## Device Information |
| 50 | + |
| 51 | +By default the Sentry SDK does not send the name of the device on Android. |
| 52 | + |
| 53 | +If you want to send the device name, set <PlatformLink to="/configuration/options/#send-default-pii">`sendDefaultPii: true`</PlatformLink> in your `Sentry.init({})` config. |
| 54 | + |
| 55 | +## Console Logs |
| 56 | + |
| 57 | +By default, the Sentry SDK sends JS console logs to Sentry which may contain PII data. |
| 58 | + |
| 59 | +To disable sending console logs, set `console: false` in your `Sentry.breadcrumbsIntegration` config, see <PlatformLink to="/integrations/default/#breadcrumbs">the Breadcrumbs documentation</PlatformLink>. |
| 60 | + |
| 61 | +## Screenshots |
| 62 | + |
| 63 | +The <PlatformLink to="/enriching-events/screenshots">screenshot feature</PlatformLink> is disabled per default, but when enabled the screenshots may contain PII data. |
| 64 | + |
| 65 | +## View Hierarchy |
| 66 | + |
| 67 | +The <PlatformLink to="/enriching-events/viewhierarchy">view hierarchy feature</PlatformLink> is disabled per default, but when enabled the view hierarchy may contain PII data when using the `accessibilityIdentifier` property with personal information. |
| 68 | + |
| 69 | +## Session Replay |
| 70 | + |
| 71 | +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 <PlatformLink to="/session-replay/privacy/">more details in the Session Replay documentation</PlatformLink>. |
| 72 | + |
| 73 | +## Source Context |
| 74 | + |
| 75 | +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 <PlatformLink to="/sourcemaps/#disable-automatic-upload/">the Source Maps documentation</PlatformLink>. |
| 76 | + |
| 77 | +To opt into native source code upload enable the feature as described in <PlatformLink to="/upload-debug/">the Debug Symbols documentation</PlatformLink>. |
0 commit comments