From 7b761e5bbf1cd611195e4a839a15538f977bdd64 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20P=C3=B6lz?=
<38893694+Flash0ver@users.noreply.github.com>
Date: Wed, 16 Apr 2025 14:30:52 +0200
Subject: [PATCH 1/3] docs(dotnet): add "Data Collected" page
---
.../common/data-management/data-collected.mdx | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 docs/platforms/dotnet/common/data-management/data-collected.mdx
diff --git a/docs/platforms/dotnet/common/data-management/data-collected.mdx b/docs/platforms/dotnet/common/data-management/data-collected.mdx
new file mode 100644
index 0000000000000..0d8ddc6d92988
--- /dev/null
+++ b/docs/platforms/dotnet/common/data-management/data-collected.mdx
@@ -0,0 +1,15 @@
+---
+title: Data Collected
+description: "See what data is collected by the Sentry SDK."
+sidebar_order: 1
+draft: true
+---
+
+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. Here's a list of data categories the Sentry .NET SDK collects:
+
+
+This documentation page is currently being updated with comprehensive information about data collection in the .NET SDK. We're working to provide detailed and accurate information about all data categories collected by the SDK. Please check back soon for the complete documentation.
+See https://github.com/getsentry/sentry-docs/issues/13416.
+
From 116f0e4104a9c1704fba33246ca2d3fdcfa43187 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20P=C3=B6lz?=
<38893694+Flash0ver@users.noreply.github.com>
Date: Wed, 16 Apr 2025 19:57:55 +0200
Subject: [PATCH 2/3] docs(dotnet): add SendDefaultPii option
---
.../dotnet/common/configuration/heap-dumps.mdx | 4 ++--
docs/platforms/dotnet/guides/aspnet/index.mdx | 4 +++-
.../aspnet/tracing/included-instrumentation.mdx | 3 +++
.../dotnet/guides/aspnet/troubleshooting.mdx | 1 +
docs/platforms/dotnet/guides/aspnetcore/index.mdx | 11 +++++++----
docs/platforms/dotnet/guides/aws-lambda/index.mdx | 4 +++-
.../dotnet/guides/azure-functions-worker/index.mdx | 8 ++++++--
.../dotnet/guides/blazor-webassembly/index.mdx | 8 +++++---
.../platforms/dotnet/guides/entityframework/index.mdx | 4 +++-
.../dotnet/guides/extensions-logging/index.mdx | 1 +
docs/platforms/dotnet/guides/maui/index.mdx | 5 ++++-
docs/platforms/dotnet/guides/uwp/index.mdx | 5 ++++-
docs/platforms/dotnet/guides/winforms/index.mdx | 11 ++++++++++-
docs/platforms/dotnet/guides/winui/index.mdx | 10 ++++++++--
docs/platforms/dotnet/guides/wpf/index.mdx | 5 ++++-
docs/platforms/dotnet/guides/xamarin/index.mdx | 4 +++-
docs/platforms/dotnet/index.mdx | 4 +++-
.../configuration/config-intro/dotnet.aspnetcore.mdx | 5 ++++-
.../configuration/config-intro/dotnet.mdx | 3 +++
.../configuration/config-intro/dotnet.xamarin.mdx | 1 +
.../configuration/diagnostic-logger/dotnet.mdx | 1 +
.../attach-screenshots/dotnet.maui.mdx | 3 ++-
.../attach-screenshots/dotnet.xamarin.mdx | 1 +
.../getting-started-config/dotnet.aspnet.mdx | 3 +++
platform-includes/getting-started-config/dotnet.mdx | 3 +++
.../performance/opentelemetry-setup/dotnet.mdx | 3 +++
26 files changed, 91 insertions(+), 24 deletions(-)
diff --git a/docs/platforms/dotnet/common/configuration/heap-dumps.mdx b/docs/platforms/dotnet/common/configuration/heap-dumps.mdx
index 3bda17b4dd691..044b4ea72f1a6 100644
--- a/docs/platforms/dotnet/common/configuration/heap-dumps.mdx
+++ b/docs/platforms/dotnet/common/configuration/heap-dumps.mdx
@@ -16,7 +16,7 @@ The basic configuration for enabling automatic heap dumps is:
```csharp
options => {
- // All your other options like DSN etc.
+ // All your other options like DSN, SendDefaultPii, etc.
...
options.EnableHeapDumps(
// Triggers if the process uses more than 90% of the total available memory
@@ -37,7 +37,7 @@ Alternatively, there is an overload of `EnableHeapDumps` that allows you to spec
```csharp
options => {
- // All your other options like DSN etc.
+ // All your other options like DSN, SendDefaultPii, etc.
...
options.EnableHeapDumps(
// Triggers if the process uses more than 10MB of memory
diff --git a/docs/platforms/dotnet/guides/aspnet/index.mdx b/docs/platforms/dotnet/guides/aspnet/index.mdx
index e63a38b2346cf..12e1e5274d6fb 100644
--- a/docs/platforms/dotnet/guides/aspnet/index.mdx
+++ b/docs/platforms/dotnet/guides/aspnet/index.mdx
@@ -34,7 +34,7 @@ as well as your logs as breadcrumbs. The logging integrations also capture event
You configure the SDK in the `Global.asax.cs`:
-```csharp {"onboardingOptions": {"performance": "20-23, 33-42"}}
+```csharp {"onboardingOptions": {"performance": "22-25, 35-44"}}
using System;
using System.Web;
using Sentry.AspNet;
@@ -53,6 +53,8 @@ public class MvcApplication : HttpApplication
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
diff --git a/docs/platforms/dotnet/guides/aspnet/tracing/included-instrumentation.mdx b/docs/platforms/dotnet/guides/aspnet/tracing/included-instrumentation.mdx
index 5317a7f52e7e8..28bbbd65d957c 100644
--- a/docs/platforms/dotnet/guides/aspnet/tracing/included-instrumentation.mdx
+++ b/docs/platforms/dotnet/guides/aspnet/tracing/included-instrumentation.mdx
@@ -40,6 +40,9 @@ namespace AspNetMvc
// When configuring for the first time, to see what the SDK is doing:
o.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ o.SendDefaultPii = true;
+
// Example sample rate for your transactions: captures 10% of transactions
o.TracesSampleRate = 0.1;
});
diff --git a/docs/platforms/dotnet/guides/aspnet/troubleshooting.mdx b/docs/platforms/dotnet/guides/aspnet/troubleshooting.mdx
index b6f2b9a66f44c..781539311ca83 100644
--- a/docs/platforms/dotnet/guides/aspnet/troubleshooting.mdx
+++ b/docs/platforms/dotnet/guides/aspnet/troubleshooting.mdx
@@ -70,6 +70,7 @@ To apply `Tags` globally, it's recommended that you set them in `SentryOptions`,
SentrySdk.Init(options =>
{
options.Dsn = "___PUBLIC_DSN___";
+ options.SendDefaultPii = true;
options.DefaultTags.Add("TagName", "value");
});
```
diff --git a/docs/platforms/dotnet/guides/aspnetcore/index.mdx b/docs/platforms/dotnet/guides/aspnetcore/index.mdx
index 3acd8572a4e97..9d1011bb5f27c 100644
--- a/docs/platforms/dotnet/guides/aspnetcore/index.mdx
+++ b/docs/platforms/dotnet/guides/aspnetcore/index.mdx
@@ -107,10 +107,11 @@ ASP.NET Core will automatically read this environment variable and bind it to th
Finally, any settings that can be configured via `appsettings.json` or environment variables can also be configured via code. Some settings can only be configured in code, such as the `BeforeSend` callback:
-```csharp {"onboardingOptions": {"performance": "3"}}
+```csharp {"onboardingOptions": {"performance": "4"}}
.UseSentry(options =>
{
- options.TracesSampleRate = 1.0; // <- Set this to configure automatic tracing
+ options.SendDefaultPii = true; // Adds request URL and headers, IP and name for users, etc.
+ options.TracesSampleRate = 1.0; // Set this to configure automatic tracing
options.SetBeforeSend((@event, hint) =>
{
// Never report server names
@@ -120,9 +121,10 @@ Finally, any settings that can be configured via `appsettings.json` or environme
})
```
-```fsharp {"onboardingOptions": {"performance": "2"}}
+```fsharp {"onboardingOptions": {"performance": "3"}}
.UseSentry (fun options ->
- options.TracesSampleRate <- 1.0 // <- Set this to configure automatic tracing
+ options.SendDefaultPii <- true // Adds request URL and headers, IP and name for users, etc.
+ options.TracesSampleRate <- 1.0 // Set this to configure automatic tracing
options.SetBeforeSend(fun event hint ->
// Never report server names
event.ServerName <- null
@@ -259,6 +261,7 @@ A tunnel is an HTTP endpoint that acts as a proxy between Sentry and your applic
```javascript
Sentry.init({
dsn: "___PUBLIC_DSN___",
+ sendDefaultPii: true,
tunnel: "/tunnel",
});
```
diff --git a/docs/platforms/dotnet/guides/aws-lambda/index.mdx b/docs/platforms/dotnet/guides/aws-lambda/index.mdx
index 967ccc43d38b5..afd3ad9ccda7b 100644
--- a/docs/platforms/dotnet/guides/aws-lambda/index.mdx
+++ b/docs/platforms/dotnet/guides/aws-lambda/index.mdx
@@ -35,7 +35,7 @@ All `ASP.NET Core` configurations are valid here. But one configuration in parti
`FlushOnCompletedRequest` ensures all events are flushed out. This is because the general ASP.NET Core hooks for when the process is exiting are not guaranteed to run in a serverless environment. This setting ensures that no event is lost if AWS recycles the process.
-```csharp {"onboardingOptions": {"performance": "12-15"}}
+```csharp {"onboardingOptions": {"performance": "14-17"}}
public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFunction
{
protected override void Init(IWebHostBuilder builder)
@@ -47,6 +47,8 @@ public class LambdaEntryPoint : Amazon.Lambda.AspNetCoreServer.APIGatewayProxyFu
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
o.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ o.SendDefaultPii = true;
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx b/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx
index 3fe0d719ad1df..bf854386b4fc3 100644
--- a/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx
+++ b/docs/platforms/dotnet/guides/azure-functions-worker/index.mdx
@@ -33,7 +33,7 @@ This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extens
Sentry integration with Azure Functions is done by calling `.UseSentry()` and specifying the options, for example:
-```csharp {"onboardingOptions": {"performance": "10-12"}}
+```csharp {"onboardingOptions": {"performance": "12-14"}}
using Sentry.Azure.Functions.Worker;
var builder = FunctionsApplication.CreateBuilder(args);
@@ -43,6 +43,8 @@ builder.UseSentry(options =>
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
@@ -57,7 +59,7 @@ If using the ASP.NET Core integration add `UseSentry` to the `ConfigureFunctions
-```csharp {"onboardingOptions": {"performance": "11-13"}}
+```csharp {"onboardingOptions": {"performance": "13-15"}}
using Sentry.Azure.Functions.Worker;
var host = new HostBuilder()
@@ -68,6 +70,8 @@ var host = new HostBuilder()
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/blazor-webassembly/index.mdx b/docs/platforms/dotnet/guides/blazor-webassembly/index.mdx
index f21bfc6a36bfa..82a2aa6950388 100644
--- a/docs/platforms/dotnet/guides/blazor-webassembly/index.mdx
+++ b/docs/platforms/dotnet/guides/blazor-webassembly/index.mdx
@@ -28,14 +28,16 @@ Sentry integration with Blazor WebAssembly is done by calling `.UseSentry()` and
-```csharp {"onboardingOptions": {"performance": "5"}}
+```csharp {"onboardingOptions": {"performance": "9"}}
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.UseSentry(options =>
{
options.Dsn = "___PUBLIC_DSN___";
- options.TracesSampleRate = 0.1;
// When configuring for the first time, to see what the SDK is doing:
- // options.Debug = true;
+ options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+ options.TracesSampleRate = 0.1;
});
// Captures logError and higher as events
diff --git a/docs/platforms/dotnet/guides/entityframework/index.mdx b/docs/platforms/dotnet/guides/entityframework/index.mdx
index 36e96c1b4b7f5..c663056b0f3dd 100644
--- a/docs/platforms/dotnet/guides/entityframework/index.mdx
+++ b/docs/platforms/dotnet/guides/entityframework/index.mdx
@@ -45,7 +45,7 @@ Add the Entity Framework 6 support to your project in one step:
For example, configuring an ASP.NET app with _global.asax_:
-```csharp {filename:global.asax} {"onboardingOptions": {"performance": "15-17, 26-35"}}
+```csharp {filename:global.asax} {"onboardingOptions": {"performance": "17-19, 28-37"}}
using System;
using System.Configuration;
using Sentry.AspNet;
@@ -60,6 +60,8 @@ public class MvcApplication : System.Web.HttpApplication
{
// We store the DSN inside Web.config
options.Dsn = ConfigurationManager.AppSettings["SentryDsn"];
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/extensions-logging/index.mdx b/docs/platforms/dotnet/guides/extensions-logging/index.mdx
index 944e253829c5a..9ee9df6d4f820 100644
--- a/docs/platforms/dotnet/guides/extensions-logging/index.mdx
+++ b/docs/platforms/dotnet/guides/extensions-logging/index.mdx
@@ -91,6 +91,7 @@ Example using `appsettings.json`:
},
"Sentry": {
"Dsn": "___PUBLIC_DSN___",
+ "SendDefaultPii": true,
"MinimumBreadcrumbLevel": "Debug",
"MinimumEventLevel": "Warning",
"MaxBreadcrumbs": 50
diff --git a/docs/platforms/dotnet/guides/maui/index.mdx b/docs/platforms/dotnet/guides/maui/index.mdx
index 1bd9c89bbd912..0e077f4dfad8e 100644
--- a/docs/platforms/dotnet/guides/maui/index.mdx
+++ b/docs/platforms/dotnet/guides/maui/index.mdx
@@ -45,7 +45,7 @@ This package extends [Sentry.Extensions.Logging](/platforms/dotnet/guides/extens
In your `MauiProgram.cs` file, call `UseSentry` on your `MauiAppBuilder`, and include any options you would like to set. The `Dsn` is the only required parameter.
-```csharp {"onboardingOptions": {"performance": "19-22"}}
+```csharp {"onboardingOptions": {"performance": "22-25"}}
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
@@ -64,6 +64,9 @@ public static MauiApp CreateMauiApp()
// This option is not recommended when deploying your application.
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/uwp/index.mdx b/docs/platforms/dotnet/guides/uwp/index.mdx
index f642bf4978951..9ba11ed09d016 100644
--- a/docs/platforms/dotnet/guides/uwp/index.mdx
+++ b/docs/platforms/dotnet/guides/uwp/index.mdx
@@ -28,7 +28,7 @@ The SDK should be initialized in the constructor of your application class (usua
-```csharp {"onboardingOptions": {"performance": "17-20"}}
+```csharp {"onboardingOptions": {"performance": "20-23"}}
using Sentry.Protocol;
using UnhandledExceptionEventArgs = Windows.UI.Xaml.UnhandledExceptionEventArgs;
@@ -45,6 +45,9 @@ sealed partial class App : Application
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/winforms/index.mdx b/docs/platforms/dotnet/guides/winforms/index.mdx
index e73ac63dacb84..318cf735a49d2 100644
--- a/docs/platforms/dotnet/guides/winforms/index.mdx
+++ b/docs/platforms/dotnet/guides/winforms/index.mdx
@@ -30,7 +30,7 @@ You should also set `Application.SetUnhandledExceptionMode(UnhandledExceptionMod
A complete example of the recommended startup is as follows:
-```csharp {"onboardingOptions": {"performance": "31-34"}}
+```csharp {"onboardingOptions": {"performance": "34-37"}}
using System;
using System.Windows.Forms;
@@ -61,6 +61,9 @@ namespace WindowsFormsApp1
// When configuring for the first time, to see what the SDK is doing:
Debug = true,
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
TracesSampleRate = 1.0,
@@ -122,6 +125,9 @@ Module Program
{
.Dsn = "___PUBLIC_DSN___",
+ ' Adds request URL and headers, IP and name for users, etc.
+ .SendDefaultPii = True,
+
' Enable Global Mode since this is a client app
.IsGlobalModeEnabled = True,
@@ -180,6 +186,9 @@ Namespace My
{
.Dsn = "___PUBLIC_DSN___",
+ ' Adds request URL and headers, IP and name for users, etc.
+ .SendDefaultPii = True,
+
' Enable Global Mode since this is a client app
.IsGlobalModeEnabled = True,
diff --git a/docs/platforms/dotnet/guides/winui/index.mdx b/docs/platforms/dotnet/guides/winui/index.mdx
index 20f86c85c8f12..77693cb7d3e71 100644
--- a/docs/platforms/dotnet/guides/winui/index.mdx
+++ b/docs/platforms/dotnet/guides/winui/index.mdx
@@ -32,7 +32,7 @@ In addition to capturing errors, you can monitor interactions between multiple s
Select which Sentry features you'd like to install in addition to Error Monitoring to get the corresponding installation and configuration instructions below.
-```csharp {"onboardingOptions": {"performance": "16-19"}}
+```csharp {"onboardingOptions": {"performance": "19-22"}}
using Sentry.Protocol;
sealed partial class App : Application
@@ -48,6 +48,9 @@ sealed partial class App : Application
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
@@ -77,7 +80,7 @@ Do not initialize the SDK in the `OnLaunched` event of the application or the `H
-```csharp {"onboardingOptions": {"performance": "18-21"}}
+```csharp {"onboardingOptions": {"performance": "21-24"}}
// Add these to your existing using statements.
using Sentry.Protocol;
using UnhandledExceptionEventArgs = Microsoft.UI.Xaml.UnhandledExceptionEventArgs;
@@ -95,6 +98,9 @@ sealed partial class App : Application
// When configuring for the first time, to see what the SDK is doing:
o.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ o.SendDefaultPii = true;
+
// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
o.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/wpf/index.mdx b/docs/platforms/dotnet/guides/wpf/index.mdx
index 0a15066c38737..965afbb99df94 100644
--- a/docs/platforms/dotnet/guides/wpf/index.mdx
+++ b/docs/platforms/dotnet/guides/wpf/index.mdx
@@ -30,7 +30,7 @@ The SDK should be initialized in the constructor of your application class (usua
The SDK automatically handles `AppDomain.UnhandledException`. On WPF, for production apps (when no debugger is attached), WPF catches exception to show the dialog to the user. You can also configure your app to capture those exceptions before the dialog shows up:
-```csharp {"onboardingOptions": {"performance": "15-18"}}
+```csharp {"onboardingOptions": {"performance": "18-21"}}
using System.Windows;
public partial class App : Application
@@ -45,6 +45,9 @@ public partial class App : Application
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
diff --git a/docs/platforms/dotnet/guides/xamarin/index.mdx b/docs/platforms/dotnet/guides/xamarin/index.mdx
index 4ccef2c214dcb..f5b5c96fc4fe7 100644
--- a/docs/platforms/dotnet/guides/xamarin/index.mdx
+++ b/docs/platforms/dotnet/guides/xamarin/index.mdx
@@ -26,7 +26,7 @@ After you’ve completed setting up a project in Sentry, Sentry will give you a
You should initialize the SDK as early as possible, for an example, the start of OnCreate
on MainActivity for Android, and, the top of FinishedLaunching on AppDelegate for iOS).
-```csharp {"onboardingOptions": {"performance": "8-11"}}
+```csharp {"onboardingOptions": {"performance": "10-13"}}
SentryXamarin.Init(options =>
{
options.AddXamarinFormsIntegration();
@@ -34,6 +34,8 @@ SentryXamarin.Init(options =>
options.Dsn = "___PUBLIC_DSN___";
// When configuring for the first time, to see what the SDK is doing:
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// Set TracesSampleRate to 1.0 to capture 100%
// of transactions for tracing.
// We recommend adjusting this value in production
diff --git a/docs/platforms/dotnet/index.mdx b/docs/platforms/dotnet/index.mdx
index b406a36757d59..ec16dde93e1cd 100644
--- a/docs/platforms/dotnet/index.mdx
+++ b/docs/platforms/dotnet/index.mdx
@@ -81,11 +81,13 @@ Install the **NuGet** package to add the Sentry dependency:
To capture all errors, even the one during the startup of your application, you should initialize the Sentry .NET SDK as soon as possible.
-```csharp {"onboardingOptions": {"performance": "5-6", "profiling": "7-8"}}
+```csharp {"onboardingOptions": {"performance": "7-8", "profiling": "9-10"}}
SentrySdk.Init(options =>
{
options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.us.sentry.io/5428537";
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
// A fixed sample rate of 1.0 - 100% of all transactions are getting sent
options.TracesSampleRate = 1.0f;
// A sample rate for profiling - this is relative to TracesSampleRate
diff --git a/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx b/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx
index 597c658b4c8ef..85bb8d73eef60 100644
--- a/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx
+++ b/platform-includes/configuration/config-intro/dotnet.aspnetcore.mdx
@@ -13,6 +13,7 @@ public static IWebHost BuildWebHost(string[] args) =>
o.Dsn = "___PUBLIC_DSN___";
o.MaxBreadcrumbs = 50;
o.Debug = true;
+ o.SendDefaultPii = true;
});
```
@@ -30,6 +31,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
o.Dsn = "___PUBLIC_DSN___";
o.MaxBreadcrumbs = 50;
o.Debug = true;
+ o.SendDefaultPii = true;
});
});
```
@@ -41,7 +43,8 @@ Additionally, you can set your options on `appsettings.json` when using `UseSent
"Sentry": {
"Dsn": "___PUBLIC_DSN___",
"MaxBreadcrumbs": 50,
- "Debug": true
+ "Debug": true,
+ "SendDefaultPii": true
}
```
diff --git a/platform-includes/configuration/config-intro/dotnet.mdx b/platform-includes/configuration/config-intro/dotnet.mdx
index 8145eb19009f0..7a7c29815f94b 100644
--- a/platform-includes/configuration/config-intro/dotnet.mdx
+++ b/platform-includes/configuration/config-intro/dotnet.mdx
@@ -15,6 +15,9 @@ SentrySdk.Init(options =>
// You shouldn't do this in your applications unless you're troubleshooting issues with Sentry.
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// This option is recommended. It enables Sentry's "Release Health" feature.
options.AutoSessionTracking = true;
diff --git a/platform-includes/configuration/config-intro/dotnet.xamarin.mdx b/platform-includes/configuration/config-intro/dotnet.xamarin.mdx
index c849fb936e5ab..ec639b79746fe 100644
--- a/platform-includes/configuration/config-intro/dotnet.xamarin.mdx
+++ b/platform-includes/configuration/config-intro/dotnet.xamarin.mdx
@@ -9,6 +9,7 @@ SentryXamarin.Init(options =>
options.AddXamarinFormsIntegration();
options.MaxBreadcrumbs = 50;
options.Debug = true;
+ options.SendDefaultPii = true;
});
// app code here
```
diff --git a/platform-includes/configuration/diagnostic-logger/dotnet.mdx b/platform-includes/configuration/diagnostic-logger/dotnet.mdx
index d6b02cd52511c..f82ef1cb036d8 100644
--- a/platform-includes/configuration/diagnostic-logger/dotnet.mdx
+++ b/platform-includes/configuration/diagnostic-logger/dotnet.mdx
@@ -5,6 +5,7 @@ Sentry's SDK includes its own internal logger to report diagnostics that may be
options =>
{
options.Dsn = "___PUBLIC_DSN___";
+ options.SendDefaultPii = true;
// Enable debug mode to write diagnostic messages
options.Debug = true;
diff --git a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx
index df397b70ec26b..f3f70a45581d5 100644
--- a/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx
+++ b/platform-includes/enriching-events/attach-screenshots/dotnet.maui.mdx
@@ -4,8 +4,9 @@ var builder = MauiApp.CreateBuilder()
.UseSentry(options =>
{
options.Dsn = "___PUBLIC_DSN___";
+ options.SendDefaultPii = true;
options.AttachScreenshot = true;
-
+
// Set a Before Screenshot capture callback to execute some code before the screenshot is taken
// This option is optional. if not set, the screenshots will be captured and sent.
options.SetBeforeScreenshotCapture((@event, hint) =>
diff --git a/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx b/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx
index 14395e80f60d7..97819773a49bd 100644
--- a/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx
+++ b/platform-includes/enriching-events/attach-screenshots/dotnet.xamarin.mdx
@@ -2,6 +2,7 @@
SentryXamarin.Init(options =>
{
options.Dsn = "___PUBLIC_DSN___";
+ options.SendDefaultPii = true;
options.AttachScreenshots = true;
});
```
diff --git a/platform-includes/getting-started-config/dotnet.aspnet.mdx b/platform-includes/getting-started-config/dotnet.aspnet.mdx
index 61b7db8ce1c45..09c6a004fa508 100644
--- a/platform-includes/getting-started-config/dotnet.aspnet.mdx
+++ b/platform-includes/getting-started-config/dotnet.aspnet.mdx
@@ -21,6 +21,9 @@ namespace AspNetMvc
// We store the DSN inside Web.config; make sure to use your own DSN!
o.Dsn = ConfigurationManager.AppSettings["SentryDsn"];
+ // Adds request URL and headers, IP and name for users, etc.
+ o.SendDefaultPii = true;
+
// Get ASP.NET integration
o.AddAspNet();
diff --git a/platform-includes/getting-started-config/dotnet.mdx b/platform-includes/getting-started-config/dotnet.mdx
index 8145eb19009f0..7a7c29815f94b 100644
--- a/platform-includes/getting-started-config/dotnet.mdx
+++ b/platform-includes/getting-started-config/dotnet.mdx
@@ -15,6 +15,9 @@ SentrySdk.Init(options =>
// You shouldn't do this in your applications unless you're troubleshooting issues with Sentry.
options.Debug = true;
+ // Adds request URL and headers, IP and name for users, etc.
+ options.SendDefaultPii = true;
+
// This option is recommended. It enables Sentry's "Release Health" feature.
options.AutoSessionTracking = true;
diff --git a/platform-includes/performance/opentelemetry-setup/dotnet.mdx b/platform-includes/performance/opentelemetry-setup/dotnet.mdx
index 86924dcb34ce4..2d22eb18aa627 100644
--- a/platform-includes/performance/opentelemetry-setup/dotnet.mdx
+++ b/platform-includes/performance/opentelemetry-setup/dotnet.mdx
@@ -17,6 +17,7 @@ Next, initialize Sentry and opt into the use of OpenTelemetry. This allows the S
SentrySdk.Init(options =>
{
// options.Dsn = "... Your DSN ...";
+ // options.SendDefaultPii = true;
options.TracesSampleRate = 1.0;
options.UseOpenTelemetry(); // <-- Configure Sentry to use OpenTelemetry trace information
});
@@ -44,6 +45,7 @@ Next, initialize Sentry and opt into the use of OpenTelemetry. This allows the S
builder.WebHost.UseSentry(options =>
{
options.Dsn = "...Your DSN...";
+ options.SendDefaultPii = true;
options.TracesSampleRate = 1.0;
options.UseOpenTelemetry(); // <-- Configure Sentry to use OpenTelemetry trace information
});
@@ -64,6 +66,7 @@ Next, initialize Sentry and opt into the use of OpenTelemetry. Provide the SDK w
_sentry = SentrySdk.Init(options =>
{
//options.Dsn = "...Your DSN...";
+ //options.SendDefaultPii = true;
options.TracesSampleRate = 1.0;
options.AddAspNet(RequestSize.Always);
options.UseOpenTelemetry(builder);
From 56f247b71207f0c200de12e3eb3a1b7aba488ad4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20P=C3=B6lz?=
<38893694+Flash0ver@users.noreply.github.com>
Date: Wed, 16 Apr 2025 19:58:09 +0200
Subject: [PATCH 3/3] Revert "docs(dotnet): add "Data Collected" page"
This reverts commit 7b761e5bbf1cd611195e4a839a15538f977bdd64.
---
.../common/data-management/data-collected.mdx | 15 ---------------
1 file changed, 15 deletions(-)
delete mode 100644 docs/platforms/dotnet/common/data-management/data-collected.mdx
diff --git a/docs/platforms/dotnet/common/data-management/data-collected.mdx b/docs/platforms/dotnet/common/data-management/data-collected.mdx
deleted file mode 100644
index 0d8ddc6d92988..0000000000000
--- a/docs/platforms/dotnet/common/data-management/data-collected.mdx
+++ /dev/null
@@ -1,15 +0,0 @@
----
-title: Data Collected
-description: "See what data is collected by the Sentry SDK."
-sidebar_order: 1
-draft: true
----
-
-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. Here's a list of data categories the Sentry .NET SDK collects:
-
-
-This documentation page is currently being updated with comprehensive information about data collection in the .NET SDK. We're working to provide detailed and accurate information about all data categories collected by the SDK. Please check back soon for the complete documentation.
-See https://github.com/getsentry/sentry-docs/issues/13416.
-