Skip to content

fix(dotnet): Clarify that EnableLogs doesn't gate SentrySdk.Logger - #19820

Merged
ric-oliv merged 4 commits into
masterfrom
fix/dotnet-enablelogs-sentrysdk-logger
Oct 6, 2026
Merged

ric-oliv merged 4 commits into
masterfrom
fix/dotnet-enablelogs-sentrysdk-logger

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

DESCRIBE YOUR PR

The .NET logs docs say EnableLogs = true is required to use the SentrySdk.Logger APIs. That stopped being true in 6.10.0 (getsentry/sentry-dotnet#5512). The option now only controls logs captured by the logging integrations (Microsoft.Extensions.Logging, Serilog, NLog, log4net). Logs created directly through SentrySdk.Logger "are always sent" (SentryOptions.cs L610–620 @ 6.12.0).

This removes the claim everywhere it appears in the .NET logs docs:

  • Options: the plain .NET EnableLogs description now says it controls integration-captured logs, not SentrySdk.Logger.
  • Options: the Microsoft.Extensions.Logging filter note no longer says EnableLogs = true "keeps the SentrySdk.Logger APIs available."
  • Setup: the intro explains that SentrySdk.Logger needs no extra configuration, and integrations need EnableLogs = true.
  • Setup (plain .NET): the SentrySdk.Init snippet no longer sets EnableLogs, and the note says you only need it with a logging integration.
  • Setup (ASP.NET Core, AWS Lambda, Azure Functions, Blazor, MAUI): the note no longer says EnableLogs enables SentrySdk.Logger; it enables the Microsoft.Extensions.Logging integration.
  • Usage: the intro no longer says the feature must be enabled before using SentrySdk.Logger.

Integration-based setup snippets still set EnableLogs = true, since every integration path still requires it.

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+

PRE-MERGE CHECKLIST

  • 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

via Junior system actor event.

--

View Junior Session [Sentry]

Co-Authored-By: Ricardo Oliveira <ricardo.oliveira@sentry.io>
@vercel

vercel Bot commented Oct 6, 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 Oct 6, 2026 8:46am UTC
1 Skipped Deployment
Project Deployment Actions Updated
develop-docs Ignored Ignored Preview Oct 6, 2026 8:46am UTC

Request Review

@github-actions github-actions Bot added the Priority: Normal Docs review has no urgent deadline label Oct 6, 2026
Co-Authored-By: Ricardo Oliveira <ricardo.oliveira@sentry.io>
@ric-oliv
ric-oliv marked this pull request as ready for review October 6, 2026 08:13
@ric-oliv
ric-oliv enabled auto-merge (squash) October 6, 2026 08:13
@cursor

cursor Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

The plan checks page failures, HTTP 5xx, and client errors on the changed logs pages. An issue escalates when those pages fail or client errors rise.

Rollout complete

Services: sentry-docs.

Plan

What changed

Readers of the .NET logs pages now see that EnableLogs only gates logging integrations. Direct SentrySdk.Logger calls always send logs from SDK 6.10.0.

This is live after a production deploy of sentry-docs. The pages are /platforms/dotnet/logs/ and each /platforms/dotnet/guides/<guide>/logs/ page that includes these snippets.

Risk

A broken include can hide Setup or Options text on those pages. It can also crash the platform selector there. Wrong wording can lead users to skip EnableLogs for logging integrations. Then those integration logs never reach Sentry.

Intended effect

This is a docs wording change. Sentry does not record the new sentences. There is no queryable production signal for the intended effect. Report intended_effect as unknown. Absent would be live pages that still say EnableLogs is required for SentrySdk.Logger. Telemetry cannot show that.

Regression watch

Watch the changed .NET logs pages only. Transaction names are /:path*?, so filter on url.path. User traces are sampled at 30 percent. Traffic on these pages was low in the baseline window. One failed span would move failure rate off zero.

Signal Baseline Window Source Rule
Pageload and navigation failure rate on .NET logs pages 0 2026-10-05T08:14:05Z to 2026-10-06T08:14:05Z Sentry project docs. Query: environment:production AND (span.op:pageload OR span.op:navigation) AND url.path:*platforms/dotnet* AND url.path:*/logs/ Hold at 0. Escalate if the rate rises above 0.
HTTP 5xx on those paths 0 2026-10-05T08:14:05Z to 2026-10-06T08:14:05Z Sentry project docs. Query: environment:production span.op:http.server http.status_code:>=500 url.path:*platforms/dotnet/* url.path:*logs/* Hold at 0. Escalate if any 5xx span appears.
Client error events on those URLs 0-2 events 2026-10-05T08:14:05Z to 2026-10-06T08:14:05Z Sentry project docs. Query: environment:production url:*platforms/dotnet* url:*logs* Hold in 0-2 events in a matching 24h window. Escalate if the count rises above 2. Sampled page spans in this window were 13. Do not treat 2/13 as an error rate.

If failure rate or 5xx rises, check client errors on the same URLs. Look for platform selector or code tab failures. Unresolved issues on these URLs were none in the baseline window.

Not observable

The live page wording is not in Sentry. Unsampled page volume is not in Sentry. Latency on these pages is not stable. Thirteen sampled spans in 24h showed p95 from 393ms to 11.9s. Do not use that p95 as a regression rule.

Comment thread platform-includes/logs/setup/dotnet.mdx
@ric-oliv
ric-oliv disabled auto-merge October 6, 2026 08:18
Comment thread platform-includes/logs/setup/dotnet.mdx
@ric-oliv
ric-oliv merged commit 63c786e into master Oct 6, 2026
26 checks passed
@ric-oliv
ric-oliv deleted the fix/dotnet-enablelogs-sentrysdk-logger branch October 6, 2026 08:56
@cursor

cursor Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Verified in production

  • Sampled .NET logs page traffic after the ship stayed at zero failures, and the new EnableLogs wording is live.

solnic pushed a commit that referenced this pull request Oct 8, 2026
…19820)

## DESCRIBE YOUR PR

The .NET logs docs say `EnableLogs = true` is required to use the
`SentrySdk.Logger` APIs. That stopped being true in 6.10.0
([getsentry/sentry-dotnet#5512](getsentry/sentry-dotnet#5512)).
The option now only controls logs captured by the logging integrations
(`Microsoft.Extensions.Logging`, Serilog, NLog, log4net). Logs created
directly through `SentrySdk.Logger` "are always sent"
([`SentryOptions.cs` L610–620 @
6.12.0](https://github.com/getsentry/sentry-dotnet/blob/6.12.0/src/Sentry/SentryOptions.cs#L610-L620)).

This removes the claim everywhere it appears in the .NET logs docs:
- **Options:** the plain .NET `EnableLogs` description now says it
controls integration-captured logs, not `SentrySdk.Logger`.
- **Options:** the `Microsoft.Extensions.Logging` filter note no longer
says `EnableLogs = true` "keeps the `SentrySdk.Logger` APIs available."
- **Setup:** the intro explains that `SentrySdk.Logger` needs no extra
configuration, and integrations need `EnableLogs = true`.
- **Setup (plain .NET):** the `SentrySdk.Init` snippet no longer sets
`EnableLogs`, and the note says you only need it with a logging
integration.
- **Setup (ASP.NET Core, AWS Lambda, Azure Functions, Blazor, MAUI):**
the note no longer says `EnableLogs` enables `SentrySdk.Logger`; it
enables the `Microsoft.Extensions.Logging` integration.
- **Usage:** the intro no longer says the feature must be enabled before
using `SentrySdk.Logger`.

Integration-based setup snippets still set `EnableLogs = true`, since
every integration path still requires it.

## IS YOUR CHANGE URGENT?

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

## PRE-MERGE CHECKLIST

- [ ] 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)

<!-- junior-request-attribution:start -->
via Junior system actor `event`.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!--
junior-conversation-id:agent-dispatch%3Adispatch_629c1689a0364da29b4e432b70cfeadb
-->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/agent-dispatch%3Adispatch_629c1689a0364da29b4e432b70cfeadb)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent-dispatch%3Adispatch_629c1689a0364da29b4e432b70cfeadb/?project=4510944073809921)

<!-- junior-session-footer:end -->

---------

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Oliveira <ricardo.oliveira@sentry.io>

This branch was successfully deployed

1 active deployment
Preview – sentry-docs — 1de410d2 Deployed Oct 6, 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.

1 participant