Skip to content

Commit 60b57af

Browse files
Updated .net migratation guide for the v6 release (#15565)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Resolves getsentry/sentry-dotnet#4609 ## IS YOUR CHANGE URGENT? - [ x ] Other deadline: Needs to happen with the version 6 release ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [x] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Stefan Pölz <38893694+Flash0ver@users.noreply.github.com>
1 parent 110123d commit 60b57af

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

docs/platforms/dotnet/common/configuration/options.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ See the <PlatformLink to="/enriching-events/scopes/">Scopes and Hubs documentati
7171

7272
</SdkOption>
7373

74-
<SdkOption name="EnableBackpressureHandling" type="bool" defaultValue="false">
74+
<SdkOption name="EnableBackpressureHandling" type="bool" defaultValue="true">
7575

7676
Specifies whether backpressure handling should be enabled or not.
7777

7878
When enabled, the sample rate for traces and errors will be reduced automatically when the SDK detects issues sending events to Sentry. Once the system is healthy again, the sample rate will be restored to the originally configured value.
7979

80-
Currently defaults to `false` (i.e. disabled), but will be enabled by default in a future version.
80+
Defaults to `true` (i.e. enabled).
8181

8282
</SdkOption>
8383

docs/platforms/dotnet/common/migration/index.mdx

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,49 @@ sidebar_order: 8000
66

77
Upgrading includes both breaking changes and new features.
88

9+
## Migrating to 6.x
10+
11+
### .NET Target Framework Changes
12+
13+
This release adds support for .NET 10 and drops support for `net8.0-android`, `net8.0-ios`, `net8.0-maccatalyst` and `net8.0-windows10.0.19041.0` ([#4461](https://github.com/getsentry/sentry-dotnet/pull/4461)).
14+
15+
This release also adds support for v3 of the Android AssemblyStore format, which is used when publishing apps targeting `net10.0-android`, and drops support for the original AssemblyStore format that was used in .NET 8 (since the Sentry SDK no longer supports .NET 8 mobile targets).
16+
17+
UWP support has also been dropped. Future efforts will likely focus on WinUI 3, in line with Microsoft's recommendations for building Windows UI apps. ([#4686](https://github.com/getsentry/sentry-dotnet/pull/4686))
18+
19+
### Significant Changes in Behavior
20+
21+
- Backpressure handling is now enabled by default, meaning that the SDK will monitor system health and reduce the sampling rate of events and transactions when the system is under load. When the system is determined to be healthy again, the sampling rates are returned to their original levels. This can be overridden using the [EnableBackpressureHandling](https://docs.sentry.io/platforms/dotnet/guides/aspnetcore/configuration/options/#EnableBackpressureHandling) option.
22+
23+
- Make configuration of `Microsoft.Extensions.Logging`-based integrations consistent and idiomatic:
24+
- _Breadcrumbs_ and _Events_ are no longer configurable via `appsettings.json` on `Sentry.AspNetCore`, to be consistent with `Sentry.Extensions.Logging` and `Sentry.Maui`
25+
- _Breadcrumbs_ are still configured via `MinimumBreadcrumbLevel` and `AddLogEntryFilter`
26+
- _Events_ are still configured via `MinimumEventLevel` and `AddLogEntryFilter`
27+
- _Structured Logs_ are now configurable via `appsettings.json` across `Sentry.Extensions.Logging`, `Sentry.AspNetCore` and `Sentry.Maui`
28+
- See [PR#4700](https://github.com/getsentry/sentry-dotnet/pull/4700) for more details
29+
30+
- Captured [Http Client Errors](https://docs.sentry.io/platforms/dotnet/guides/aspnet/configuration/http-client-errors/) on .NET 5+ now include a full stack trace in order to improve Issue grouping. See [PR#4724](https://github.com/getsentry/sentry-dotnet/pull/4724) for more details.
31+
32+
### Breaking Changes
33+
34+
#### Changed APIs
35+
36+
- `BreadcrumbLevel.Critical` has been renamed to `BreadcrumbLevel.Fatal` for consistency with the other Sentry SDKs
37+
- `SentryLog.ParentSpanId` has been renamed to `SentryLog.SpanId` to better reflect the protocol
38+
- Spans and Transactions now implement `IDisposable` so that they can be used with `using` statements/declarations that will automatically finish the span with a status of OK when it passes out of scope, if it has not already been finished, to be consistent with `Activity` classes when using OpenTelemetry
39+
- SpanTracer and TransactionTracer are now `sealed`
40+
- CaptureFeedback now returns a `SentryId` and a `CaptureFeedbackResult` out parameter that indicate whether feedback was captured successfully and what the reason for failure was otherwise
41+
- ScopeExtensions.Populate is now internal and cannot be used from user code anymore. It was never intended to be part of the public API.
42+
- All logging provider types are _internal_ now in order to ensure configuration as intended.
43+
- `SentryOptions.IsEnvironmentUser` now defaults to false on MAUI. This means the User.Name will no longer be set, by default, to the name of the device, to respect privacy by default. You can override this to reinstate the previous behavior, if needed.
44+
45+
#### Removed APIs
46+
47+
- `Sentry.Azure.Functions.Worker` has been deprecated as very few people were using it and the functionality can easily be replaced with OpenTelemetry. We've replaced our integration with a sample showing how to do this using our OpenTelemetry package instead: https://github.com/getsentry/sentry-dotnet/tree/main/samples/Sentry.Samples.OpenTelemetry.AzureFunctions
48+
- `SentrySdk.CaptureUserFeedback` and all associated members have been removed. You should use the newer `SentrySdk.CaptureFeedback` instead.
49+
- Removed the unusual constructor from `Sentry.Maui.BreadcrumbEvent` that had been marked as obsolete. That constructor expected a `IEnumerable<(string Key, string Value)>[]` argument (i.e. an array of IEnumerable of tuples). If you were using this constructor, you should instead use the alternate/simpler constructor that expects just an IEnumerable of tuples: `IEnumerable<(string Key, string Value)>`.
50+
51+
952
## Migrating to 4.x
1053

1154
### .NET Target Framework Changes
@@ -262,7 +305,7 @@ To align with other SDKs, the option is now named: `DiagnosticLogger`
262305

263306
`SentryOptions` now take a string for `Dsn`:
264307

265-
Before: `options.Dsn = new Dsn("..");`
308+
Before: `options.Dsn = new Dsn("..");`
266309
After: `options.Dsn = "..";`
267310

268311
#### `LogEntry` Became `Message`

0 commit comments

Comments
 (0)