Skip to content

Commit 1ccb14d

Browse files
authored
docs(dotnet): add Data Collected pages (#13529)
1 parent dfdad54 commit 1ccb14d

File tree

3 files changed

+185
-0
lines changed

3 files changed

+185
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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. Here's a list of data categories the Sentry .NET SDK collects:
10+
11+
## HTTP Headers
12+
13+
By default, the Sentry SDK sends HTTP headers to Sentry but redacts any headers that may contain sensitive data. (See the [list of headers](https://github.com/getsentry/sentry-dotnet/blob/main/src/Sentry/Internal/RedactedHeaders.cs#L7) that are redacted).
14+
15+
## Cookies
16+
17+
By default, the Sentry SDK doesn't send cookies.
18+
19+
If you want to send cookies, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
20+
21+
A [data scrubber](/platforms/dotnet/data-management/sensitive-data/) can be used to filter information before sending data to Sentry.
22+
23+
Any [sensitive cookies](https://github.com/getsentry/relay/blob/249971e1702991c64cf0f7f89773fb019ffb4a95/relay-pii/src/convert.rs#L235-L263) that the SDK does send will be stripped by Relay before Sentry stores these.
24+
25+
## Information About Logged-in User
26+
27+
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.
28+
29+
To start sending logged-in user information, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
30+
31+
## Users' IP Address
32+
33+
By default, the Sentry SDK doesn't send the user's IP address.
34+
35+
To enable sending the user's IP address, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
36+
37+
Even if enabled, whether you're able to send the user's IP address or not, will depend on the integrations you enable in Sentry's SDK. Most integrations won't set the user's IP address at all.
38+
39+
You can [prevent Sentry from storing IP Addresses](https://docs.sentry.io/platforms/native/enriching-events/identify-user/#ip_address) either by configuring this in the "Security & Privacy" settings of your Sentry project or using [server-side data scrubbing](https://docs.sentry.io/security-legal-pii/scrubbing/server-side-scrubbing/).
40+
41+
## Request URL
42+
43+
By default, the [HttpRequestUrl](https://learn.microsoft.com/en-us/dotnet/api/System.UriComponents) of outgoing and incoming HTTP requests is **always sent to Sentry**. This includes the Scheme, Host, Port, LocalPath, and Query data.
44+
45+
If `SendDefaultPii` is set to `true` then the [AbsoluteUri](https://learn.microsoft.com/en-us/dotnet/api/System.UriComponents) of outgoing and incoming HTTP requests will be sent to Sentry (including the Scheme, UserInfo, Host, Port, LocalPath, Query, and Fragment data).
46+
47+
Depending on your application, this could contain PII data.
48+
49+
## Request Query String
50+
51+
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.
52+
53+
<PlatformSection supported={["dotnet.aspnetcore", "dotnet.aspnet"]}>
54+
55+
## Request Body
56+
57+
The <PlatformLink to="/configuration/options/#max-request-body-size">MaxRequestBodySize</PlatformLink> option can be used to configure whether the request body of incoming HTTP requests will be sent to Sentry.
58+
59+
By default this is sent to `RequestSize.None`, which means that the request body is not sent to Sentry.
60+
61+
If you want request bodies to be sent to Sentry then this should be set instead to `RequestSize.Small`, `RequestSize.Medium`, or `RequestSize.Always`.
62+
63+
</PlatformSection>
64+
65+
## SQL Queries
66+
67+
While SQL queries are sent to Sentry, neither the full SQL query (`SELECT * FROM users WHERE email = '[email protected]'`), nor the values of its parameters will ever be sent. A parameterized version of the query (`SELECT * FROM users WHERE email = @email`) is sent instead.
68+
69+
## Machine Name
70+
71+
The Sentry SDK does not send the machine name by default.
72+
73+
If you assign a value to the `ServerName` in the Sentry options then Sentry SDK will send this with any events.
74+
75+
Otherwise, if `SendDefaultPii` is set to true then the Sentry SDK will capture the `Environment.MachineName` automatically and send this with any events.
76+
77+
## General Device Information
78+
79+
The Sentry SDK collects information about the device, such as the version and build of your operating system, CPU and GPU details etc. This information is sent to Sentry by default.
80+
81+
<PlatformSection supported={["dotnet.maui"]}>
82+
83+
## Data captured by Mobile SDKs
84+
85+
On mobile platforms, the Sentry SDK for .NET can also capture data indirectly via the Android and iOS SDKs. You should refer to the documentation for those SDKs for more information on what data is captured.
86+
87+
- [Android](/platforms/android/data-management/data-collected/)
88+
- [iOS](/platforms/apple/data-management/data-collected/)
89+
90+
</PlatformSection>
91+
92+
## Native Crash Reporting
93+
94+
When compiling .NET applications Ahead-Of-Time (AOT), native crashes may also be captured. You should refer to [data captured by the Native SDK](/platforms/native/data-management/data-collected/) to understand what data is sent with those events.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Data Collected
3+
description: "See what data is collected by the Sentry SDK for PowerShell."
4+
sidebar_order: 1
5+
---
6+
7+
The Sentry SDK for PowerShell is a wrapper around the Sentry SDK for .NET. The data collected by the Sentry SDK for PowerShell is the same as the data collected by the Sentry SDK for .NET. For details, see [Data Collected by the Sentry SDK for .NET](/platforms/dotnet/data-management/data-collected/).
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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. Here's a list of data categories the Sentry .NET SDK collects:
10+
11+
## HTTP Headers
12+
13+
By default, the Sentry SDK sends HTTP headers to Sentry but redacts any headers that may contain sensitive data. (See the [list of headers](https://github.com/getsentry/sentry-dotnet/blob/main/src/Sentry/Internal/RedactedHeaders.cs#L7) that are redacted).
14+
15+
## Cookies
16+
17+
By default, the Sentry SDK doesn't send cookies.
18+
19+
If you want to send cookies, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
20+
21+
A [data scrubber](/platforms/dotnet/data-management/sensitive-data/) can be used to filter information before sending data to Sentry.
22+
23+
Any [sensitive cookies](https://github.com/getsentry/relay/blob/249971e1702991c64cf0f7f89773fb019ffb4a95/relay-pii/src/convert.rs#L235-L263) that the SDK does send will be stripped by Relay before Sentry stores these.
24+
25+
## Information About Logged-in User
26+
27+
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.
28+
29+
To start sending logged-in user information, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
30+
31+
## Users' IP Address
32+
33+
By default, the Sentry SDK doesn't send the user's IP address.
34+
35+
To enable sending the user's IP address, set the option `SendDefaultPii = true` when initializing the Sentry SDK.
36+
37+
Even if enabled, whether you're able to send the user's IP address or not, will depend on the integrations you enable in Sentry's SDK. Most integrations won't set the user's IP address at all.
38+
39+
You can [prevent Sentry from storing IP Addresses](https://docs.sentry.io/platforms/native/enriching-events/identify-user/#ip_address) either by configuring this in the "Security & Privacy" settings of your Sentry project or using [server-side data scrubbing](https://docs.sentry.io/security-legal-pii/scrubbing/server-side-scrubbing/).
40+
41+
## Request URL
42+
43+
By default, the [HttpRequestUrl](https://learn.microsoft.com/en-us/dotnet/api/System.UriComponents) of outgoing and incoming HTTP requests is **always sent to Sentry**. This includes the Scheme, Host, Port, LocalPath, and Query data.
44+
45+
If `SendDefaultPii` is set to `true` then the [AbsoluteUri](https://learn.microsoft.com/en-us/dotnet/api/System.UriComponents) of outgoing and incoming HTTP requests will be sent to Sentry (including the Scheme, UserInfo, Host, Port, LocalPath, Query, and Fragment data).
46+
47+
Depending on your application, this could contain PII data.
48+
49+
## Request Query String
50+
51+
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.
52+
53+
## SQL Queries
54+
55+
While SQL queries are sent to Sentry, neither the full SQL query (`SELECT * FROM users WHERE email = '[email protected]'`), nor the values of its parameters will ever be sent. A parameterized version of the query (`SELECT * FROM users WHERE email = @email`) is sent instead.
56+
57+
## Device Unique Identifier
58+
59+
The Sentry SDK does not set the `Device Unique Identifier` by default.
60+
61+
If `SendDefaultPii` is set to `true` then the SDK will capture `SystemInfo.deviceUniqueIdentifier` automatically and send this with any event.
62+
63+
## Machine Name
64+
65+
The Sentry SDK does not send the machine name by default.
66+
67+
If you assign a value to the `ServerName` in the Sentry options then Sentry SDK will send this with any events.
68+
69+
Otherwise, if `SendDefaultPii` is set to true then the Sentry SDK will capture the `Environment.MachineName` automatically and send this with any events.
70+
71+
## General Device Information
72+
73+
The Sentry SDK collects information about the device, such as the version and build of your operating system, CPU and GPU details etc. This information is sent to Sentry by default.
74+
75+
## Data captured by Mobile SDKs
76+
77+
On mobile platforms, the Sentry SDK for .NET can also capture data indirectly via the Android and iOS SDKs. You should refer to the documentation for those SDKs for more information on what data is captured.
78+
79+
- [Android](/platforms/android/data-management/data-collected/)
80+
- [iOS](/platforms/apple/data-management/data-collected/)
81+
82+
## Data captured by the Native SDK
83+
84+
When compiling for Windows, Linux or other platforms that use Sentry Native, you should refer to [data captured by the Native SDK](/platforms/native/data-management/data-collected/) to understand what data is sent with those events.

0 commit comments

Comments
 (0)