docs(dotnet/logs): add NLog structured logs integration#18738
Merged
Conversation
Document the NLog structured-logs integration added in getsentry/sentry-dotnet#5176, mirroring the existing Serilog logs docs: - Enable the Logs page for the NLog guide (remove from notSupported) - Add NLog setup, usage, options, requirements and integration-list entries - List NLog on the product Logs getting-started page Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: James Crosswell <james.crosswell@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jamescrosswell
commented
Jul 16, 2026
6 tasks
jamescrosswell
marked this pull request as ready for review
July 17, 2026 02:44
dingsdax
approved these changes
Jul 20, 2026
dingsdax
approved these changes
Jul 20, 2026
dingsdax
self-requested a review
July 20, 2026 15:34
dingsdax
approved these changes
Jul 20, 2026
dingsdax
added a commit
that referenced
this pull request
Jul 20, 2026
## DESCRIBE YOUR PR Documents the new log4net **structured logs** integration added in getsentry/sentry-dotnet#5172, mirroring the existing Serilog logs documentation and the sibling NLog logs docs PR (#18738). ### Changes - **Enable the Logs page for the log4net guide** — removed `dotnet.log4net` from the `notSupported` list in `common/logs/index.mdx`, so `/platforms/dotnet/guides/log4net/logs/` now renders. - **log4net guide** (`guides/log4net/index.mdx`) — added a cross-link to the Logs page. - **Product Logs getting-started** — added log4net to the list of supported SDKs. - **`logs/*` platform-includes** (requirements, setup, usage, options, integrations) — added log4net-specific content: enabling `EnableLogs` via `SentrySdk.Init` (log4net's appender doesn't expose it), the log4net→Sentry level mapping, and the `category.name`/`property.<name>` attribute behavior. ###⚠️ Needs confirmation The **version in `requirements/dotnet.mdx` is a placeholder — `6.8.0`.** The source PR (getsentry/sentry-dotnet#5172) isn't released yet (current released version is 6.6.0), so please correct this to whatever release actually ships the `Sentry.Log4Net` structured-logs feature. ### Notes - Faithful port of the Serilog/NLog logs docs onto log4net — same structure, `PlatformSection` gating, and phrasing. - log4net-specific caveat documented: because log4net renders messages before they reach the appender, its structured logs carry the formatted message but **no template or parameters** (unlike Serilog/NLog). - Should merge only once/after getsentry/sentry-dotnet#5172 lands and its release version is known. Related: getsentry/sentry-dotnet#5172 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): - [ ] Other deadline: - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Johannes Daxböck <johannes.daxboeck@sentry.io>
# Conflicts: # docs/platforms/dotnet/common/logs/index.mdx # docs/product/logs/getting-started/index.mdx # platform-includes/logs/integrations/dotnet.mdx # platform-includes/logs/options/dotnet.mdx # platform-includes/logs/requirements/dotnet.mdx # platform-includes/logs/setup/dotnet.mdx # platform-includes/logs/usage/dotnet.mdx
| <PlatformSection supported={["dotnet.nlog"]}> | ||
| Logs for <PlatformOrGuideName/> are supported in Sentry <PlatformOrGuideName/> SDK version `6.8.0` and above. | ||
| </PlatformSection> | ||
|
|
Contributor
There was a problem hiding this comment.
Bug: The documentation uses a placeholder version 6.8.0 for a feature. This version is not final and will be incorrect if merged as-is, causing user confusion.
Severity: MEDIUM
Suggested Fix
Before merging, update the placeholder version 6.8.0 in platform-includes/logs/requirements/dotnet.mdx to the correct, released version of the Sentry .NET SDK that includes the feature. This ensures the documentation provides accurate requirements to users.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: platform-includes/logs/requirements/dotnet.mdx#L12
Potential issue: The documentation introduces a placeholder version `6.8.0` for NLog
structured logs support. While the PR author has noted this is a temporary value and the
PR should only be merged after the actual SDK version is determined, there are no
automated CI checks or technical gates to prevent a premature merge. If this PR is
merged before the placeholder is updated, users will be given incorrect information
about the minimum required SDK version, leading to confusion and failed attempts to use
the feature.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
Documents the new NLog structured logs integration added in getsentry/sentry-dotnet#5176, mirroring the existing Serilog logs documentation.
Changes
dotnet.nlogfrom thenotSupportedlist incommon/logs/index.mdx, so/platforms/dotnet/guides/nlog/logs/now renders.guides/nlog/index.mdx) — added "Send structured logs to Sentry" to the feature list and a cross-link to the Logs page.logs/*platform-includes (requirements, setup, usage, options, integrations) — added NLog-specific content: theEnableLogssetup viaAddSentry(...), the NLog→Sentry log-level mapping, thecategory.name/property attribute behavior, and the integration-list entry.The version in
requirements/dotnet.mdxis a placeholder —6.8.0. The source PR isn't released yet (current released version is 6.7.0), so please correct this to whatever release actually ships theSentry.NLogstructured-logs feature.Notes
PlatformSectiongating, and phrasing.NLogintegration sentry-dotnet#5176 lands and its release version is known.Related: getsentry/sentry-dotnet#5176
🤖 Generated with Claude Code