feat(logs): add NLog integration
#5176
Draft
@sentry/warden / warden: find-bugs
completed
May 1, 2026 in 54s
1 issue
find-bugs: Found 1 issue (1 low)
Low
DateTimeOffset constructed from DateTime may use unintended local offset - `src/Sentry.NLog/SentryTarget.Structured.cs:10`
The constructor new DateTimeOffset(logEvent.TimeStamp) infers the offset from the DateTime's Kind: Local/Unspecified uses the machine's local offset, while Utc uses zero. NLog's default TimeSource produces local DateTimes, so the resulting offset will reflect server-local time, which can be inconsistent across deployments and may cause confusion when correlating Sentry log timestamps. If a custom TimeSource yields DateTimeKind.Unspecified it will silently be treated as local. Consider normalizing to UTC explicitly.
Duration: 53.0s · Tokens: 284.9k in / 1.8k out · Cost: $1.35
Loading