Repository navigation
Description
#6084 and #6086 both ship in 7.2.0. The .NET docs on docs.sentry.io still call ConfigureDataCollection experimental, set SendDefaultPii in their snippets, and say the machine name follows SendDefaultPii. They need updating once 7.2.0 is out, ideally in one sentry-docs PR.
What changes in 7.2.0
From #6084:
SendDefaultPiiis deprecated in favour ofConfigureDataCollection. It's[Obsolete], so setting it in code raises CS0618. It will be removed in the next major (DataCollection phase 5: remove SendDefaultPii (next major) #5439).ConfigureDataCollectionand its types are no longer experimental, so they no longer raiseSENTRY0001.- A parameterless
ConfigureDataCollection()opts in with the defaults. It replacesSendDefaultPii = true. - Once
ConfigureDataCollectionhas been called, the SDK no longer replaces credentials in URLs the app set itself on breadcrumbs and span descriptions. It still removes them from the URLs it records.
From #6086: AttachServerName controls whether Environment.MachineName is sent as the server name when ServerName isn't set. It defaults to true, except on Android, iOS and Mac Catalyst, where the machine name is the name of the user's device.
Without ConfigureDataCollection |
With ConfigureDataCollection |
|
|---|---|---|
| Events and logs | AttachServerName and SendDefaultPii |
AttachServerName |
| ASP.NET and ASP.NET Core events | AttachServerName |
AttachServerName |
- An explicitly set
ServerNamealways wins. ASP.NET used to overwrite it with the machine name. - Android, iOS and Mac Catalyst apps with
SendDefaultPii = trueno longer send the device name. They can setAttachServerName = trueto keep sending it. - Desktop and console apps start sending the machine name once they call
ConfigureDataCollection, unless they setAttachServerName = false. The machine name there often includes the user's name.
Pages to change in getsentry/sentry-docs
Line links are pinned to sentry-docs 9286774.
Options and Data Collected
Options (docs/platforms/dotnet/common/configuration/options.mdx):
SendDefaultPii: mark it deprecated in favour ofConfigureDataCollection(), and say it's removed in the next major.ConfigureDataCollection: drop theSENTRY0001paragraph and show the parameterless overload. Theappsettings.jsonparagraph mentionsSENTRY0001too.- "Migrating From
SendDefaultPii":- Map
SendDefaultPii = truetooptions.ConfigureDataCollection();. - Tell apps that used
SendDefaultPii = falseto also setAttachServerName = false. - The last paragraph lists what
SendDefaultPiistill controls. OnceConfigureDataCollectionhas been called, that's only the user thatSentry.OpenTelemetrysets: app-set URLs are left alone, and the machine name followsAttachServerName.
- Map
- Add an
AttachServerNameoption next toServerName, and pointServerName's second paragraph at it.
Data Collected (docs/platforms/dotnet/common/data-management/data-collected.mdx):
- "Machine Name" says
ConfigureDataCollectiondoesn't control the machine name, and that apps other than ASP.NET and ASP.NET Core send it only withSendDefaultPii. Rewrite it aroundAttachServerName. - "Request URL" says
ConfigureDataCollectiondoesn't change how credentials in other breadcrumbs and span descriptions are filtered. Once it has been called, the SDK sends them as they are, so they're replaced with[Filtered]only withoutConfigureDataCollectionand withSendDefaultPii = false.
"Experimental" and SENTRY0001
- The data collection setup step:
getting-started-data-collection/dotnet.mdxanddotnet.aspnetcore.mdx. - AI Agents.
- OpenTelemetry calls
ConfigureDataCollection"an experimental API". The rest of that page stays, sinceSentry.OpenTelemetrystill readsSendDefaultPii.
Prose that explains behavior through SendDefaultPii
These need rewriting, not just a snippet swap:
- ASP.NET Core: Capturing the affected user and the
SendDefaultPiisection - ASP.NET: Capturing the affected user and the
SendDefaultPiisection - Google Cloud Functions: Capturing the Affected User
- Identify Users: the IP address needs
SendDefaultPii - Scrubbing Sensitive Data: lines 36 and 54
- HTTP Client Errors and GraphQL Client Errors: both say headers and cookies are sent when
SendDefaultPiiis on.
Snippets that set SendDefaultPii = true
These now raise CS0618, and several have comments that describe SendDefaultPii as the switch for request headers and user data. The samples in #6084 replace it with options.ConfigureDataCollection(dataCollection => dataCollection.UserInfo = true);, or "DataCollection": { "UserInfo": true } in appsettings.json, so readers can see which setting to change.
- .NET root page,
getting-started-config/dotnet.mdx,getting-started-config/dotnet.aspnet.mdx - ASP.NET Core appsettings, C#, F#, Tunnel; ASP.NET
- Android, Apple (macOS), AWS Lambda, Blazor Server, Blazor WebAssembly, Entity Framework, Generic Host, Google Cloud Functions, MAUI, WinForms (also VB at L132 and L196), WinUI (and L105), WPF
Lower priority:
platform-includes/configuration/config-intro/: dotnet, aspnetcore, azure-functions-worker, extensions-hosting, google-cloud-functions- diagnostic-logger, MAUI attach-screenshots, OpenTelemetry setup for ASP.NET Core, heap dumps (comment, also L39), ASP.NET included instrumentation, ASP.NET troubleshooting, NLog advanced example (C# and F#)
Left alone on purpose: the v7 migration includes and migration/index.mdx, which are historical, and Xamarin, which is the separate Sentry.Xamarin SDK.
The page list started as a comment on #5437, with links updated to current sentry-docs.
Activity
linear-code commentedon Dec 3, 2026
NET-987
[-]docs: document AttachServerName and update the server name wording[/-][+]docs: update the .NET docs for the SendDefaultPii deprecation and AttachServerName[/+]