Skip to content

docs(dotnet): Correct quick-start setup and verification - #20240

Merged
jamescrosswell merged 16 commits into
masterfrom
docs/dotnet-quickstart-accuracy
Nov 10, 2026
Merged

jamescrosswell merged 16 commits into
masterfrom
docs/dotnet-quickstart-accuracy

Conversation

@sfanahata

@sfanahata sfanahata commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #19990: correct setup and verification across the base .NET quick start and all 19 integration guides, checked against SDK 6.12.1.

Most setup inaccuracies predate the template migration. This also corrects the new claim that Sentry.Profiling installs on .NET Framework and adds the tracing option missing from the WinForms VB examples.

  • Fix package prerequisites, missing imports and terminators, ASP.NET Core and MAUI compatibility guidance, EF6 application-lifetime disposal, and the Google Cloud Functions user-factory interface.
  • Separate AppKit/macOS initialization from iOS and Mac Catalyst, scope Cocoa features to supported targets, and mark native tracing on Apple and Android as opt-in through Native.EnableTracing.
  • Use the OTLP exporter and OpenTelemetry sampling for the Blazor Server example; remove duplicate logging registration from Blazor WebAssembly.
  • Clarify which integration initializes Sentry, enable structured logs where needed, and verify logging through the configured provider or appender.
  • Add shared verification steps for logs, metrics, and traces, including manual transactions where sampling alone doesn't create tracing data.

Validation: 31 focused documentation tests and all applicable pre-commit checks passed, including typo, external-link, and trailing-slash checks. All 22 changed MDX files compiled through the repository pipeline with website telemetry disabled in the temporary validation harness; shared includes, JSON examples, and the new OTLP link resolved. The .NET SDK is unavailable locally, so C#/VB snippets were source-checked but not compiled or run.

IS YOUR CHANGE URGENT?

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

Align setup examples and supported platforms with SDK 6.12.1. Clarify logging initialization, use the OTLP exporter for Blazor tracing, and verify each telemetry type.

Refs #19990
@vercel

vercel Bot commented Oct 26, 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 9:17pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Nov 10, 2026 9:17pm UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Oct 26, 2026
@codeowner-assignment
codeowner-assignment Bot requested a review from a team October 26, 2026 22:41
@sfanahata

Copy link
Copy Markdown
Contributor Author

cc @ric-oliv — this follows up on #19990 with corrections to the .NET quick-start setup and verification instructions.

@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.

Thank you, @sfanahata!

It looks great in general, I'm just adding a few comments.

The changes that matter most for readers are removing native tracing from the Android and Apple quick starts, the VB snippets that still don't compile, and the Blazor WASM sample rate.

Many lines in these examples set options to their default values (for example options.Native.AnrEnabled = true on Android). Either way works from the SDK side: keeping them shows readers which options exist, and removing them makes the snippets shorter. If you'd rather remove them, let me know and I'll mark the lines.

@sfanahata
sfanahata marked this pull request as ready for review October 27, 2026 20:01
@codeowner-assignment
codeowner-assignment Bot requested review from a team October 27, 2026 20:01
@cursor

cursor Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Services awaiting deployment · Rollout details

Warning

Rollouts can't watch this change after it deploys: every data source for this team needs to be signed in again, so a check has no telemetry to read. Sign in to your data sources, or ask a team admin to.

Status Service Environment
⚪ Not deployed yet sentry-docs

Mention @rollout in a comment to update the plan.

sfanahata and others added 12 commits October 29, 2026 11:20
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>
Use With statement blocks in both WinForms VB examples so comments and blank lines remain valid. Keep the ASP.NET and Entity Framework SDK handles static so shutdown disposes the initialized SDK across HttpApplication instances.

@coolguyzone coolguyzone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me!

Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
@codeowner-assignment
codeowner-assignment Bot requested a review from a team November 9, 2026 22:24
jamescrosswell pushed a commit that referenced this pull request Nov 10, 2026
…20642)

> [!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

The MAUI guide doesn't say which .NET and OS versions `Sentry.Maui`
supports, and it still lists Tizen, which the SDK dropped in 4.0. This
adds a Supported Versions section for 7.x and removes Tizen from the
feature list. The docs aren't versioned, so the section is written for
7.x, with a "Changed in Version 7.0.0" note that sends 6.x readers to
the migration guide.

The new section lists:

- .NET 10 and .NET 11
- the minimum Android API level and the minimum iOS, Mac Catalyst and
Windows versions for each
- the Xcode version, which the .NET iOS and Mac Catalyst workloads set.
It links to the dotnet/macios releases, which name it for each release.

Closes getsentry/sentry-dotnet#5714

### Notes for review

- The values come from `Directory.Build.props` on `version7` (51e7d99f).
They match the `SupportedOSPlatform` attributes in the 7.0.0-rc.2
`Sentry.Maui` assemblies, and the platform table in the migration
guide's "Supported .NET Versions and Platforms" section, which has no
Windows row.
- James asked on the issue to [ship this with the 7.0
docs](getsentry/sentry-dotnet#5714 (comment)),
so the page only shows the 7.x values.
- The 6.x note names only the .NET versions. The iOS minimum changed
during 6.x, from 13.0 in 6.0.0 to 15.0 by 6.5.0, so one set of 6.x
minimums would be wrong for part of 6.x.
- The page doesn't pin an Xcode version. The Sentry packages don't check
it, and the required Xcode changes between workload releases for the
same .NET version. .NET 10 has workload releases for both Xcode 27.0 and
27.1, for example.
- #20240 adds a line under the intro saying
`Sentry.Maui` 6.x needs .NET MAUI 9 or later. Once it's on `master` and
merged into `dotnet-v7`, that line should go, since this section covers
it.
- The issue mentions that the .NET guides for Apple and Android have the
same gap. This PR only covers the MAUI guide, which is what the issue
scopes.

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

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@ric-oliv

Copy link
Copy Markdown
Member

Sorry for the delay here, @sfanahata, and thanks for the updates! Almost everything is in. Two parts of my earlier comments were below the suggestion block, so committing the suggestion didn't apply them:

  1. Android, line 35 (docs/platforms/dotnet/guides/android/index.mdx): Activity lifecycle and User Interaction tracing come from the Android SDK's own tracing, which is off unless Native.EnableTracing is set. The snippet no longer sets it, so please change line 35 to:

        - Opt-in automatic [Activity lifecycle tracing](/platforms/android/tracing/instrumentation/automatic-instrumentation/#activity-instrumentation) and [User Interaction tracing](/platforms/android/tracing/instrumentation/automatic-instrumentation/#user-interaction-instrumentation) through the embedded Android SDK. See <PlatformLink to="/configuration/native-options/#Native.EnableTracing">`Native.EnableTracing`</PlatformLink>.
  2. WinUI, line 36 (docs/platforms/dotnet/guides/winui/index.mdx): please add using Sentry; above using Sentry.Protocol; in the first snippet, as you did in the second one. Without it, the snippet compiles only when implicit usings are turned on.

    using Sentry;
    using Sentry.Protocol;

Optional: Serilog line 928 still says "Enable EnableLogs on the options…". The NLog guide now says "Set EnableLogs = true on the options…", so you could use the same wording here.

@jamescrosswell
jamescrosswell self-requested a review November 10, 2026 21:08
Activity lifecycle and User Interaction tracing come from the embedded
Android SDK, which only traces when Native.EnableTracing is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jamescrosswell
jamescrosswell merged commit 38a66b7 into master Nov 10, 2026
30 checks passed
@jamescrosswell
jamescrosswell deleted the docs/dotnet-quickstart-accuracy branch November 10, 2026 21:19
jamescrosswell added a commit that referenced this pull request Nov 10, 2026
Brings in #20240. Dropped its Sentry.Maui 6.x version line,
which the Supported Versions section already covers for 7.0.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamescrosswell added a commit that referenced this pull request Nov 10, 2026
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>
jamescrosswell added a commit that referenced this pull request Nov 10, 2026
Brings in master, including #20240. Kept the 7.0.0 logging
setup in the log4net, NLog and Serilog guides, and updated the verify steps
from #20240 for 7.0.0: the integrations no longer initialize the SDK and send
logs without EnableLogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamescrosswell added a commit that referenced this pull request Nov 11, 2026
…#19961)

> [!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
(getsentry/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
getsentry/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.
- #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 #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.

- [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>
Co-authored-by: Ricardo Colombo Oliveira <github@ricoliv.com>

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 5c5239b5 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: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants