Skip to content

docs(dotnet/logs): add NLog structured logs integration#18738

Merged
jamescrosswell merged 5 commits into
masterfrom
dotnet-nlog-logs-docs
Jul 21, 2026
Merged

docs(dotnet/logs): add NLog structured logs integration#18738
jamescrosswell merged 5 commits into
masterfrom
dotnet-nlog-logs-docs

Conversation

@jamescrosswell

@jamescrosswell jamescrosswell commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Documents the new NLog structured logs integration added in getsentry/sentry-dotnet#5176, mirroring the existing Serilog logs documentation.

Changes

  • Enable the Logs page for the NLog guide — removed dotnet.nlog from the notSupported list in common/logs/index.mdx, so /platforms/dotnet/guides/nlog/logs/ now renders.
  • NLog guide (guides/nlog/index.mdx) — added "Send structured logs to Sentry" to the feature list and a cross-link to the Logs page.
  • Product Logs getting-started — added NLog to the list of supported SDKs.
  • logs/* platform-includes (requirements, setup, usage, options, integrations) — added NLog-specific content: the EnableLogs setup via AddSentry(...), the NLog→Sentry log-level mapping, the category.name/property attribute behavior, and the integration-list entry.

⚠️ Needs confirmation

The version in requirements/dotnet.mdx is 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 the Sentry.NLog structured-logs feature.

Notes

Related: getsentry/sentry-dotnet#5176

🤖 Generated with Claude Code

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

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview Jul 21, 2026 12:31am
sentry-docs Ready Ready Preview Jul 21, 2026 12:31am

Request Review

Comment thread platform-includes/logs/requirements/dotnet.mdx Outdated
@codeowner-assignment
codeowner-assignment Bot requested a review from a team July 20, 2026 15:32
@dingsdax
dingsdax self-requested a review July 20, 2026 15:34
@codeowner-assignment
codeowner-assignment Bot requested a review from a team July 20, 2026 15:49
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>

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

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

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.

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.

@jamescrosswell
jamescrosswell merged commit e4d954f into master Jul 21, 2026
23 checks passed
@jamescrosswell
jamescrosswell deleted the dotnet-nlog-logs-docs branch July 21, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants