Skip to content

Fix the NLog guide's option names and set-tag example #5716

Closed
getsentry/sentry-docs
#19926

Description

@jamescrosswell

Two errors in the NLog docs that predate 7.0.0:

  • The options list in docs/platforms/dotnet/guides/nlog/index.mdx documents SendEventPropertiesAsData and SendEventPropertiesAsTags. Neither exists on SentryNLogOptions or SentryTarget. The real option is IncludeEventPropertiesAsTags. Check the rest of the list against src/Sentry.NLog/SentryNLogOptions.cs and SentryTarget.cs while you're there.
  • The C# and F# tabs of platform-includes/enriching-events/set-tag/dotnet.nlog.mdx call scope.SetTag("logger", "${logger}"), with the comment "You can still use NLog layouts in code to set configured properties". The Sentry scope doesn't render NLog layouts, so the tag value is the literal string ${logger}. Only tags configured on the target (in NLog.config or through SentryNLogOptions) are rendered as layouts.

Both fixes are accurate for 6.x, so they can merge now.

getsentry/sentry-docs#19925 (merges at 7.0.0 GA) also edits both files: it removes InitializeSdk from the options list and dsn from the set-tag target. Expect a small conflict there when it merges master.

Activity

  1. linear-code commented on Oct 13, 2026

    @linear-code
  2. added a commit that references this issue on Oct 13, 2026
    ac0b515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETPull requests that update .net codeDocsNLog

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions