Skip to content

docs(dotnet): Update Microsoft.Extensions.Logging guide for SDK 7.0.0 - #19961

Merged
jamescrosswell merged 9 commits into
dotnet-v7from
dotnet-v7-extensions-logging
Nov 11, 2026
Merged

jamescrosswell merged 9 commits into
dotnet-v7from
dotnet-v7-extensions-logging

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Note

This targets dotnet-v7, which collects the .NET docs for sentry-dotnet 7.0.0. #20641 merges that branch into master when 7.0.0 ships, so this PR can merge into dotnet-v7 as soon as it's approved.

DESCRIBE YOUR PR

In sentry-dotnet 7.0.0 the Microsoft.Extensions.Logging integration no longer initializes the SDK (getsentry/sentry-dotnet#5595). Generic host apps call UseSentry from the new Sentry.Extensions.Hosting package instead, which has its own guide (#20311). This updates the parts of getsentry/sentry-dotnet#5706 that #19925 leaves out:

  • Microsoft.Extensions.Logging guide:
    • Generic host apps, ASP.NET Core and MAUI skip this setup and go to their own guides. The note names generic host apps that used builder.Logging.AddSentry(...) on 6.x.
    • Apps without a host call SentrySdk.Init, then AddSentry(), on a LoggerFactory or their own ServiceCollection. If they inject IHub, ISentryClient or Func<IHub>, they register them with HubAdapter.Instance, because AddSentry() no longer does (feat(mel)!: Logging.AddSentry() no longer registers IHub or ISentryClient sentry-dotnet#5740). .NET Framework apps on Host.CreateApplicationBuilder() are pointed to the Generic Host guide's .NET Framework section.
    • Structured logs are always sent on this page, and Configure says how to send fewer.
    • Removes the DSN in AddSentry(...), InitializeSdk, and SDK settings under Logging:Sentry. Documents what Logging:Sentry still accepts, and AddLogEntryFilter.
  • Generic Host guide: the AddLogEntryFilter link pointed at #filters, which this page no longer has. "Replacing SentrySdk.Init" now says UseSentry leaves structured logs off until EnableLogs is set.
  • ASP.NET Core guide: SentryAspNetCoreOptions now extends SentryHostOptions, not SentryLoggingOptions.

Closes getsentry/sentry-dotnet#5706

Notes for review

  • Checked against origin/version7 (51e7d99fb), which includes fix(logging)!: Logging:Sentry:LogLevel category entries only filter structured logs sentry-dotnet#5869:
    • Every C# snippet on the Microsoft.Extensions.Logging guide compiles on net10.0 with only Sentry.Extensions.Logging referenced.
    • With SentrySdk.Init and AddSentry(), every ILogger entry is sent as a structured log without EnableLogs.
    • Logging:Sentry, added with AddConfiguration, is read: MinimumEventLevel applies, and a category entry under LogLevel drops only that category's structured logs. A Dsn key there throws NotSupportedException from LoggerFactory.Create.
    • Without the HubAdapter lines, a service that injects IHub fails with Unable to resolve service for type 'Sentry.IHub' while attempting to activate ....
  • ClearProviders() moved out with the generic host content. It applies to ASP.NET Core's UseSentry too, which the ASP.NET Core guide doesn't mention yet.
  • Filters was always internal. The page shows AddLogEntryFilter.
  • The ASP.NET Core paragraph leaves out namespaces. SentryHostOptions is still in Sentry.Extensions.Logging on version7.
  • On 6.x, AddSentry() after SentrySdk.Init initializes the SDK again without a DSN, and that throws. That's why the 7.0.0 note tells 6.x users to set the DSN in AddSentry(...) instead.
  • docs(dotnet): Correct quick-start setup and verification #20240 also edits this page, against 6.x. Whichever merges second needs a merge from master. This PR leaves the Sentry prefix alert alone, which docs(dotnet): Correct quick-start setup and verification #20240 rewrites.

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-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): 2026-11-30
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

🤖 Generated with Claude Code

In 7.0.0 the Microsoft.Extensions.Logging integration no longer
initializes the SDK. The guide now initializes Sentry with
SentrySdk.Init before AddSentry(), limits the Logging:Sentry section to
the levels it still accepts, drops InitializeSdk, documents
AddLogEntryFilter and the standard-error warning, and fixes the
ASP.NET Core options hierarchy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-docs Ready Ready Preview Nov 10, 2026 11:30pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Nov 10, 2026 11:30pm UTC

Request Review

@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 14, 2026 01:41
@github-actions github-actions Bot added the Priority: Urgent Docs review is needed immediately for an urgent deadline label Oct 14, 2026
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
@cursor

cursor Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Services awaiting deployment · Rollout details

Status Service Environment
⚪ Not deployed yet sentry-docs

Mention @rollout in a comment to update the plan.

…s-logging

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sentry-dotnet 7.0.0 adds Sentry.Extensions.Hosting, whose UseSentry
initializes Sentry for generic host apps and adds the logging
integration (getsentry/sentry-dotnet#5739). Logging.AddSentry() no
longer registers IHub, ISentryClient or Func<IHub> (#5740), and it adds
Sentry's providers back after ClearProviders() (#5776, #5789, #5821).

The guide now shows UseSentry for generic host apps, and SentrySdk.Init
with AddSentry() for apps without a host and for .NET Framework apps on
Host.CreateApplicationBuilder(), with the HubAdapter registration for
apps that inject the hub. It adds the ClearProviders() rule, the top-level
Sentry section next to Logging:Sentry, and EnableLogs for UseSentry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ric-oliv added a commit that referenced this pull request Oct 29, 2026
<!-- Keep the urgency section so automation can prioritize this PR. You
may delete other sections you don't need. -->

## 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:

- A full guide at `/platforms/dotnet/migration/v6-to-v7/`, built from
one include per change in `includes/migration/dotnet-v7/`.
- An interactive checklist at
`/platforms/dotnet/migration/v6-to-v7/interactive/` that renders the
same includes through `<MigrationGuide migration="dotnet-v7" />`.
- An agent prompt callout that points at the guide's `.md` URL.
- A "Migrating to 7.x" section at the top of the existing .NET migration
page, which links to both.

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-v7` to the `MIGRATIONS`
map in the `MigrationGuide` component and to the validator's
`COLLECTIONS` map, with specs for both. These changes in
`src/components/migrationGuide/` and `scripts/` 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.2` from nuget.org and against the
`version7` branch 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 `.md` URL to point at.

Two develop-docs rules pull in different directions here. [Managing
Linear
projects](https://develop.sentry.dev/sdk/getting-started/playbooks/coordination/managing-linear-projects/#visibility-for-major-releases)
says docs "MUST NOT go live before the SDK ships". The [breaking changes
playbook](https://develop.sentry.dev/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes/#6-update-docs-and-changelog)
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.2` is 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:

- The Python 2.0 guide merged on 2024-02-28, while only the `2.0.0a1`
alpha was out. Its note at the top said so.
- The JavaScript v11 guide merged on 2026-09-08 with `11.0.0-beta.1`
out, and its interactive version followed on 2026-09-11.
- The Flutter v10 guide merged on 2026-10-05 with `10.0.0-rc.2` out,
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,
names `7.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()` after `ClearProviders()` doesn't add Sentry's
logger providers back yet. That came with getsentry/sentry-dotnet#5776,
after rc.2.
- `DecompressionMethods` still includes Brotli, which
getsentry/sentry-dotnet#5816 takes out of the default after rc.2. The
note says how to leave it out until then.
- An ASP.NET Core app that sends `ILogger` entries through NLog crashes
with `Debug` on, tracked in getsentry/sentry-dotnet#5822. The guide's
verify step turns `Debug` on, so the note says to leave it off in those
apps.
- Its `net11.0` builds depend on the .NET 11 release candidate versions
of three `Microsoft.Extensions` packages.

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:

- Logs and the logging integrations: #19925
- `Microsoft.Extensions.Logging` and ASP.NET Core: #19961
- OpenTelemetry propagation: #19924
- Release and environment: #19960
- Hangfire monitor schedules: #19781

Three 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.Hosting` package 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-DD` with the
due date. You can update this information later by editing the PR
description.

- [x] Urgent deadline (GA date, etc.): 2026-11-30
- [ ] Other deadline: YYYY-MM-DD
- [ ] No deadline: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

_Make sure you've checked the following before merging your changes:_

- [ ] Checked Vercel preview for correctness, including links
- [ ] 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: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

@ric-oliv ric-oliv left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall!

One structural suggestion: what do you think about not documenting the Generic Host on this page? Now that it has its own integration, I'd treat it like ASP.NET Core and MAUI and add a "skip this setup" note that links to the Generic Host guide from #20311. This page would then only cover apps that call SentrySdk.Init and AddSentry() themselves.

#20311 already covers most of what this PR adds for the Generic Host: UseSentry on both builders, not calling AddSentry() as well, the Sentry section, ClearProviders(), the .NET Framework fallback with HubAdapter, and EnableLogs. Keeping both means two copies to keep in sync. It also settles line 23. On this page logs are always sent, so there's no split between SentrySdk.Init and UseSentry to explain here. #20311 should pick that up, though. An app that replaces SentrySdk.Init with UseSentry stops sending ILogger entries as logs until it sets EnableLogs.

A few things to watch when moving it out:

  • The link 404s until #20311 merges, so that one needs to land first.
  • Generic host apps that followed this page on 6.x are the readers most likely to land here after upgrading, so the skip note should name them.
  • I'd keep the Logging:Sentry part of Logging Configuration. Apps that call SentrySdk.Init and AddSentry() hit the same three-key rule, so a leftover Logging:Sentry:Dsn still fails at startup. Only the top-level Sentry section moves out.
  • ClearProviders() isn't Generic Host only. ASP.NET Core's UseSentry adds the same providers and logs the same warning, and the ASP.NET Core guide doesn't mention it. I'd either keep a short version here or move it to that guide.
  • AddLogEntryFilter on the UseSentry options isn't in #20311 yet, so it'd need to move there. It's defined on SentryHostOptions, so it works with ASP.NET Core's options too.
  • Once the .NET Framework tab moves out, only apps that build their own ServiceCollection need the HubAdapter block. Keep it if Other Apps covers them, otherwise it can go.

Two smaller things inline. The 7.0.0 note is the one I'd change before merging.

Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
@ric-oliv ric-oliv mentioned this pull request Nov 9, 2026
6 of 8 tasks
@ric-oliv
ric-oliv changed the base branch from master to dotnet-v7 November 9, 2026 14:04
jamescrosswell and others added 2 commits November 10, 2026 20:30
The Generic Host guide (#20311) now documents UseSentry, so the
Microsoft.Extensions.Logging guide only covers apps without a host,
which call SentrySdk.Init and AddSentry() themselves. Generic host
apps, including those that used builder.Logging.AddSentry(...) on 6.x,
are pointed to the new guide next to ASP.NET Core and MAUI.

On this page structured logs are now always sent, so the overview says
so, and Configure says how to send fewer. Logging Configuration keeps
the Logging:Sentry rules but drops the top-level Sentry section, and
the ClearProviders() section and the UseSentry tabs are removed.

In the Generic Host guide, the AddLogEntryFilter link pointed at
#filters, which this page no longer has, and Replacing SentrySdk.Init
now says that UseSentry leaves structured logs off until EnableLogs is
set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@ric-oliv ric-oliv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this covers everything from my last pass. I checked the page against version7 (51e7d99f): the snippets match the 7.0 API, Logging:Sentry rejects other keys as described, and with SentrySdk.Init every entry goes out as a structured log. A few optional comments inline.

Unrelated to this PR: ILoggerFactory.AddSentry() only adds the events provider, not the structured logs one. The 6.x version of this page showed new LoggerFactory().AddSentry(...), so apps that keep that call and drop the DSN get events but no logs. 6.x behaves the same. Worth an SDK issue? Either that overload adds the structured logs provider too, or it becomes obsolete.

Brings in master, including #20240. Kept the 7.0.0 setup
in the Microsoft.Extensions.Logging guide; the 6.x generic-host and
InitializeSdk examples #20240 corrected are replaced here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng guide

- Move TagFilters out of the AddSentry options. On 7.0,
  SentryLoggingOptions doesn't derive from SentryOptions, so
  options.TagFilters doesn't compile there. Also say that it matches
  substrings of scope tag keys, not prefixes.
- Say "Microsoft.Extensions.Logging filters" so they aren't confused
  with the Log Entry Filters further down.
- Move the .NET Framework note next to the Generic Host bullet it
  qualifies.
- Link the 6.x to 7.x migration guide from the 7.0.0 note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell

Copy link
Copy Markdown
Collaborator Author

Thanks! Applied all four in eafe5a4. TagFilters is now its own section with your text, the filters sentence names Microsoft.Extensions.Logging, the .NET Framework note sits right after the integration list, and the 7.0.0 note links the migration guide.

Good catch on ILoggerFactory.AddSentry(). I opened getsentry/sentry-dotnet#5908 and put it in the 7.0.0 milestone.

jamescrosswell added a commit that referenced this pull request Nov 11, 2026
> [!NOTE]
> This targets `dotnet-v7`, which collects the .NET docs for
sentry-dotnet 7.0.0. #20641 merges that branch into
`master` when 7.0.0 ships, so this PR can merge into `dotnet-v7` as soon
as it's approved.

## DESCRIBE YOUR PR

Updates the .NET logging docs for sentry-dotnet 7.0.0. In 7.0.0,
`SentryOptions.EnableLogs` and `SentryOptions.EnableMetrics` are
removed, Serilog, NLog and log4net send logs as soon as they're added,
and the Serilog, NLog, log4net and Microsoft.Extensions.Logging
integrations no longer initialize the SDK. The pages are written for
7.x. The docs aren't versioned, so this goes live with the rest of the
7.0.0 docs.

- **Logs setup, options and usage**
(`platform-includes/logs/*/dotnet.mdx`): `EnableLogs` is only documented
on the host options (ASP.NET Core, AWS Lambda, Azure Functions, Blazor
Server, Blazor WebAssembly, MAUI). The Serilog, NLog, log4net and
Microsoft.Extensions.Logging snippets call `SentrySdk.Init` and add the
integration without a switch. The host and Serilog/NLog/log4net sections
explain when `EnableLogs` sends each log twice.
- **Serilog, NLog and log4net guides**: initialize Sentry first, then
add the sink/target/appender. Removed initializing through the
integration, `InitializeSdk`, and the DSN, environment, release and
`<options>` settings on the NLog target and log4net appender. Documented
Serilog's `UseSerilog()` and the one-time standard-error warning.
- **NLog includes**: removed `dsn` from the set-tag and set-user
variants, including the `options.Dsn` that #19990
added to the set-tag snippet. Deleted the set-environment, set-release
and config-intro variants, so the NLog guide uses the generic .NET
pages, which set these on the options passed to `SentrySdk.Init`.
- **Blazor WebAssembly**: removed `builder.Logging.AddSentry(o =>
o.InitializeSdk = false)`, which no longer compiles and was already
redundant with `UseSentry`.
- **Azure Functions**: installs `Sentry.Extensions.Hosting` instead of
`Sentry.Extensions.Logging`, and starts Sentry with `.UseSentry(options
=> ...)` on the `HostBuilder` chain instead of
`logging.AddSentry(options => ...)`. `EnableLogs = true` stays in the
snippet, now on `SentryGenericHostOptions`. Apps with the ASP.NET Core
integration (`ConfigureFunctionsWebApplication()`) call the same
`UseSentry`. The "Changed in Version 7.0.0" alert covers 6.x, which has
no hosting package.
- **ASP.NET**: removed `EnableLogs` from the `SentrySdk.Init` snippet
and from the list of features the snippet turns on. Send Logs now says
the Serilog, NLog and log4net integrations send logs as soon as they're
added, and points to `SetBeforeSendLog` for dropping them.
- **Metrics options**: `EnableMetrics` was removed in 7.0.0. Kept the
advice to return `null` from `SetBeforeSendMetric`.

Closes getsentry/sentry-dotnet#5698
Part of getsentry/sentry-dotnet#5706

### Notes for review

- The Serilog, NLog and log4net guides each have a new "Capturing
Startup Crashes" subsection for apps that want crashes from before
`UseSentry` starts Sentry (getsentry/sentry-dotnet#5844). Each calls
`SentrySdk.Init` before the builder; the Serilog one does it alongside
Serilog's two-stage initialization. The companion samples,
getsentry/sentry-dotnet#5847 and getsentry/sentry-dotnet#5866, link to
them.
- Merged `master` after #19990, which moved the
.NET guides to the new quick start template. The Azure Functions and
Blazor WebAssembly changes now sit on that template, which already uses
`UseOtlp()` for Azure Functions.
- The Microsoft.Extensions.Logging snippet on the logs setup page uses
`SentrySdk.Init` plus `builder.Logging.AddSentry()`, and says in one
sentence that generic-host apps use `UseSentry` from
`Sentry.Extensions.Hosting` instead. The Microsoft.Extensions.Logging
guide page is updated in #19961, so this PR only
partly covers #5706.
- Azure Functions follows getsentry/sentry-dotnet#5739. It adds
`Sentry.Extensions.Hosting` with `UseSentry`, and says Azure Functions
(isolated) apps use it, also with the ASP.NET Core integration. Checked
against `version7`: `SentryGenericHostOptions.EnableLogs` defaults to
`false`, and `UseSentry` registers Sentry's `ILogger` providers.
`ConfigureFunctionsWorkerDefaults()` and
`ConfigureFunctionsWebApplication()` return `IHostBuilder`, so the
snippet binds to `UseSentry(IHostBuilder,
Action<SentryGenericHostOptions>)`. The SDK starts in `Build()` and
closes when the host stops. The `version7` sample makes the same call.
getsentry/sentry-dotnet#5740 stops `Logging.AddSentry()` from
registering `IHub`, so `UseSentry` is now also what puts it in DI.
- The logs setup and options includes list `dotnet.extensions-hosting`
in the `UseSentry` + `EnableLogs` sections, the `appsettings.json` tab
and the Serilog/NLog/log4net expandables. That's the platform key of the
generic-host guide coming in a separate PR, so that PR doesn't need to
edit these files. Nothing links to it yet, since the page doesn't exist
on this branch. Azure Functions isn't in the Serilog/NLog/log4net
expandables: their snippets use `builder.Services` and
`builder.Logging`, which a `HostBuilder` chain doesn't have.
- "Before 7.0.0" notes appear only where a 6.x reader following the page
would silently get no logs, or replace their SDK setup: the
Serilog/NLog/log4net and Microsoft.Extensions.Logging sections of the
logs setup page, the `EnableLogs` option, and the Azure Functions guide.
- #5698 says an ASP.NET Core app that also uses the Serilog sink sends
each log twice with `EnableLogs` on. That only happens when `ILogger`
entries reach both Sentry's provider and Serilog. I checked against
`version7`: one `LogInformation` call was sent once with
`builder.Host.UseSerilog()`, which replaces the logger factory, and
twice with `builder.Logging.AddSerilog()`. The same applies to NLog and
log4net when they're registered as `ILogger` providers. So the docs name
that case, registering the framework as an `ILogger` provider (for
example `builder.Logging.AddSerilog()`), and say to leave `EnableLogs`
off then.
- #5706 describes `UseSerilog()` as the replacement for
`ApplySerilogScopeToEvents()`. On `version7` it's optional: if the app
doesn't call it, the sink registers the scope processor itself once it's
running, so only events captured before then miss the `LogContext`
properties. The guide says so.
- Changes beyond the two issues:
- `dotnet.blazor-server` added to the `EnableLogs` sections. It uses
`Sentry.AspNetCore`'s `UseSentry`, but it fell into the plain
`SentrySdk.Init` section, which now says logging integrations need no
switch.
- log4net logs usage no longer mentions `SentryAppender.Environment`,
which 7.0.0 removes (getsentry/sentry-dotnet#5592).
- The NLog set-user snippet used `new User`. That type doesn't exist, so
it's now `SentryUser`.
- The Azure Functions snippet drops `TracesSampleRate` and
`DisableSentryHttpMessageHandler`, which the `version7` sample still
sets. Under `UseOtlp()` Sentry creates no transactions of its own, so
`TracesSampleRate` has no effect. `SentryHttpMessageHandler` already
skips span creation, so disabling it would only stop it propagating
`sentry-trace`. #19924 documents both.
- The C# and F# snippets I added or changed compile against the
`version7` sources. The Azure Functions and `UseSentry` ones compile
against the 7.0.0-rc.2 packages, whose public API matches `version7`.

## 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-DD` with the
due date. You can update this information later by editing the PR
description.

- [x] Urgent deadline (GA date, etc.): 2026-11-30
- [ ] Other deadline: YYYY-MM-DD
- [ ] No deadline: Not urgent, can wait up to 1 week+

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
ric-oliv added a commit that referenced this pull request Nov 15, 2026
## DESCRIBE YOUR PR

This updates the .NET docs for sentry-dotnet 7.0.0, which has been on
NuGet since 2026-11-12. Each change was reviewed in its own PR against
the `dotnet-v7` branch, so the 7.x docs go live together:

- #20311 docs(dotnet): Add a Generic Host guide for SDK 7.0.0
- #20642 docs(dotnet): Add supported versions to the MAUI guide for SDK
7.0.0
- #19960 docs(dotnet): Document release and environment resolution for
SDK 7.0.0
- #19961 docs(dotnet): Update Microsoft.Extensions.Logging guide for SDK
7.0.0
- #19924 docs(dotnet): Update OTLP propagation docs for SDK 7.0.0
- #19925 docs(dotnet): Update logging docs for SDK 7.0.0
- #20715 docs(dotnet): Document ClearProviders() in the ASP.NET Core
guide for SDK 7.0.0
- #20752 docs(dotnet): Tell .NET Framework apps to install
Microsoft.Extensions.Logging for SDK 7.0.0
- #20743 docs(dotnet): Document NLog's MinimumLogLevel for SDK 7.0.0
- #20742 docs(dotnet): Link the Generic Host guide from the other .NET
pages for SDK 7.0.0
- #20689 docs(dotnet): Update the 7.x migration guide for 7.0.0
- #20780 docs(dotnet): Fix Serilog flushing, Serilog usings and the
Azure Functions package for SDK 7.0.0
- #20781 docs(dotnet): Fix the .NET logs and metrics examples and other
pages for SDK 7.0.0

### Issues this closes

Closes getsentry/sentry-dotnet#5710

The other docs issues for 7.0.0 were closed when their PRs merged into
`dotnet-v7`.

### Before merging

- [x] sentry-dotnet 7.0.0 is on NuGet.
- [x] The release candidate alert is gone from
`includes/dotnet-v7-migration-overview.mdx`.
- [x] The links that #20311, #19961 and #19925 left for after the other
PRs merge are in.
- [x] `master` is merged into `dotnet-v7`, and the Vercel preview looks
right.
- [x] This description has a `Closes` line for every issue that's still
open.

## 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-DD` with the
due date. You can update this information later by editing the PR
description.

- [x] Urgent deadline (GA date, etc.): 2026-11-13
- [ ] Other deadline: YYYY-MM-DD
- [ ] No deadline: Not urgent, can wait up to 1 week+

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com>
Co-authored-by: ric-oliv <ric-oliv@users.noreply.github.com>
Co-authored-by: ric-oliv <5938598+ric-oliv@users.noreply.github.com>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>

This branch was successfully deployed

2 active (1 outdated) deployments
Preview – sentry-docs — eafe5a46 Deployed Nov 10, 2026 by vercel[bot]
Preview – develop-docs — b2545799 Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: Urgent Docs review is needed immediately for an urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that the logging integrations no longer initialize the SDK in v7.0.0

2 participants