Repository navigation
docs(dotnet): Add 6.x to 7.x migration guide for 7.0.0-rc.2 - #20143
Merged
Merged
Conversation
Version 7 of the .NET SDK moves initialization out of the logging integrations, removes SentryOptions.EnableLogs, adds Sentry.Extensions.Hosting and raises the mobile and MAUI minimum to .NET 10. Upgraders need a guide with before and after code for each change while 7.0 is in release candidate. Follows the Flutter v10 pattern: a full guide and an interactive checklist built from one include per change, plus an agent prompt. An alert at the top names the current release candidate and comes out at GA. The dotnet-v7 collection is registered in the MigrationGuide component and the migration item validator. Refs NET-860 Refs getsentry/sentry-dotnet#5710 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Reword the overview, the supported .NET versions, the CS0619 errors and the IHub registration as suggested in review. The overview now says the Sentry.OpenTelemetry package as a whole is obsolete and will be removed, not only the span processor setup. The suggestions go in with a typo fix, US spelling and one run-on sentence split in two. The OpenTelemetry paragraph keeps the AddSentry() and UseOpenTelemetry() names so readers can match it to the warning they get. The EnableLogs section is unchanged until the discussion on getsentry/sentry-dotnet#5755 settles where EnableLogs lives. Refs NET-860 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…learProviders Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 3 tasks
getsentry/sentry-dotnet#5755 closed without moving the ILogger integration out of UseSentry, so EnableLogs stays on the host options. Logging.AddSentry() can now add Sentry's logger providers back after ClearProviders(), and DecompressionMethods no longer includes Brotli. Rewrite the EnableLogs section around what turns logs on in each kind of app, update the ClearProviders and redundant AddSentry advice, and add an item for the Brotli default. Sum up the Serilog, NLog and log4net setups in the guide, so it doesn't depend on #19925 merging first. The release candidate note lists the two places where rc.2 still differs. Refs NET-860 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ric-oliv
marked this pull request as ready for review
October 28, 2026 13:33
Contributor
|
Monitoring services · Rollout details
Mention |
An independent review against 7.0.0-rc.2 found that a 6.x Serilog or NLog package left next to Sentry 7 usually fails silently. It adds fine, then throws MissingMethodException on every entry, which the logging framework swallows. The guide said the Serilog sink fails as soon as the app adds it, which only happens with WriteTo.Sentry() and no arguments. A dsn in Serilog's JSON configuration surfaces as a TargetInvocationException, with the explanation in its inner exception. rc.2 still accepts Brotli by default, so the release candidate note says how to leave it out until the next release. The overview's logs bullet also names Logging.AddSentry() after SentrySdk.Init, and says the Sentry.OpenTelemetry setup has been obsolete since 6.12.0. Refs NET-860 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@jamescrosswell I've updated the guide, and the PR is now specific to rc.2. The note at the top lists where rc.2 still behaves differently from what the guide describes. Since option 4 was dropped in getsentry/sentry-dotnet#5755, the Mind taking another look? |
coolguyzone
reviewed
Oct 28, 2026
coolguyzone
reviewed
Oct 28, 2026
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
This was referenced Oct 29, 2026
The Removed and Internal APIs section had only one subsection, Other Removed and Internal APIs, so the two headings repeated each other. Keep the one that matches the item's title, so its link stays the same. Refs NET-860 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DESCRIBE YOUR PR
This PR adds the migration guide for version 7 of the Sentry SDK for .NET, ready for the public release candidate,
7.0.0-rc.2. It follows the pattern of the Flutter v10 guide from #19390:/platforms/dotnet/migration/v6-to-v7/, built from one include per change inincludes/migration/dotnet-v7/./platforms/dotnet/migration/v6-to-v7/interactive/that renders the same includes through<MigrationGuide migration="dotnet-v7" />..mdURL.Both pages live under
common/, so they render for every .NET guide, such as ASP.NET Core, MAUI, WPF and Serilog. Xamarin uses a separate SDK, so the new pages exclude it. I didn't move the 6.x, 4.x and 3.x sections, so every existing URL and anchor keeps working and the PR needs no redirects.To register the collection, the PR adds
dotnet-v7to theMIGRATIONSmap in theMigrationGuidecomponent and to the validator'sCOLLECTIONSmap, with specs for both. These changes insrc/components/migrationGuide/andscripts/touch code that the JavaScript and Flutter guides share, so they need an approval from the docs team. For reference, msonnb approved the last change to the component in #19729, and andreiborza approved the JavaScript interactive guide that added it in #19076.The checklist shows one step only on the MAUI guide. Every other step applies to every .NET guide, because .NET apps combine integrations, such as a Serilog sink in an ASP.NET Core app.
I checked the guide against
7.0.0-rc.2from nuget.org and against theversion7branch at getsentry/sentry-dotnet@a56c63455. The guide describes 7.0.0. Where rc.2 still behaves differently, the release candidate note at the top says so.Why this goes live during the release candidate
I'd like to merge this as soon as it's approved, while 7.0 is still in release candidate. 7.0.0 GA is planned for 2026-11-30. People who try the release candidate need the guide now, and the agent prompt needs a published
.mdURL to point at.Two develop-docs rules pull in different directions here. Managing Linear projects says docs "MUST NOT go live before the SDK ships". The breaking changes playbook says to publish the migration guide "before or alongside the major release". I read the first rule as protecting users from docs for code they can't get. Version
7.0.0-rc.2is public on nuget.org, and the guide's first block says it's a release candidate and names that version. Other SDKs made the same call:2.0.0a1alpha was out. Its note at the top said so.11.0.0-beta.1out, and its interactive version followed on 2026-09-11.10.0.0-rc.2out, four days before 10.0.0.The release candidate note
The guide opens with one
<Alert>. It says there is no stable 7.0 yet, names7.0.0-rc.2, and says the rest of the .NET docs describe 6.x until 7.0.0 ships. It also covers what only the release candidate has:Logging.AddSentry()afterClearProviders()doesn't add Sentry's logger providers back yet. That came with fix(logging): make Logging.AddSentry() work after UseSentry and ClearProviders() sentry-dotnet#5776, after rc.2.DecompressionMethodsstill includes Brotli, which fix!: exclude Brotli from default SentryOptions.DecompressionMethods sentry-dotnet#5816 takes out of the default after rc.2. The note says how to leave it out until then.ILoggerentries through NLog crashes withDebugon, tracked in NLog target stack overflow when Debug is on and NLog handles ILogger sentry-dotnet#5822. The guide's verify step turnsDebugon, so the note says to leave it off in those apps.net11.0builds depend on the .NET 11 release candidate versions of threeMicrosoft.Extensionspackages.The rest of the guide describes 7.0.0 as released. At GA, I'll delete that one block from
includes/dotnet-v7-migration-overview.mdx, and nothing else needs to change.What this PR leaves to other PRs
This PR only adds the guide and what it needs. The reference pages are in other PRs, and this one doesn't need any of them to merge first:
Microsoft.Extensions.Loggingand ASP.NET Core: docs(dotnet): Update Microsoft.Extensions.Logging guide for SDK 7.0.0 #19961Three links in the guide point to the "Apps That Call UseSentry" sections that #19925 adds to the Serilog, NLog and log4net guides. Until #19925 merges, they open those guides at the top, and the migration guide sums up the same setups itself.
There is no page for the new
Sentry.Extensions.Hostingpackage yet. I'll link it from the guide once that page exists.Refs https://linear.app/getsentry/issue/NET-860
Refs getsentry/sentry-dotnet#5710
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: