Repository navigation
docs(dotnet): Correct quick-start setup and verification - #20240
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
ric-oliv
left a comment
There was a problem hiding this comment.
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.
|
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.
Mention |
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.
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
…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>
|
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:
Optional: Serilog line 928 still says "Enable |
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>
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>
…#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>
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.Profilinginstalls on .NET Framework and adds the tracing option missing from the WinForms VB examples.Native.EnableTracing.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?