Skip to content

fix: events from the logging integrations list the integration's package in sdk.packages - #5693

Merged
ric-oliv merged 1 commit into
version7from
fix/logging-sdk-packages
Oct 8, 2026
Merged

ric-oliv merged 1 commit into
version7from
fix/logging-sdk-packages

Conversation

@jamescrosswell

Copy link
Copy Markdown
Collaborator

Summary

On version7, events captured by the Serilog sink, the NLog target, the log4net appender and SentryLogger no longer listed the integration's package in sdk.packages. When #5573, #5585, #5592 and #5595 stopped the logging integrations from setting sdk.name, they also removed the AddPackage calls. This change adds the package back to each event those integrations create. sdk.name doesn't change, so it still identifies the integration that initialized the SDK.

In 6.x, the Microsoft.Extensions.Logging package was added to a scope that SentryLoggerProvider pushed, so it showed up on every event. Now SentryLogger adds it only to the events it creates, the same as the other three integrations.

Each integration builds its package once, using a small internal GetNuGetPackage() helper in core.

Notes

  • The regression never shipped, so this PR is marked #skip-changelog.
  • The snapshot tests still skip SdkVersion (IgnoreMembersWithType<SdkVersion>()), so the new tests check sdk.packages directly.

Closes #5649

#skip-changelog

🤖 Generated with Claude Code

…ents it captures

The Serilog, NLog, log4net and Microsoft.Extensions.Logging integrations
stopped adding their package when they stopped setting sdk.name. Add it
back to each event they create, leaving sdk.name to the integration that
initialized the SDK.

Closes #5649

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 75.18%. Comparing base (0b841f0) to head (9e41835).
⚠️ Report is 7 commits behind head on version7.

Files with missing lines Patch % Lines
src/Sentry/Reflection/AssemblyExtensions.cs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           version7    #5693      +/-   ##
============================================
+ Coverage     74.65%   75.18%   +0.53%     
============================================
  Files           505      520      +15     
  Lines         18372    18910     +538     
  Branches       3535     3669     +134     
============================================
+ Hits          13715    14217     +502     
- Misses         3796     3830      +34     
- Partials        861      863       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell
jamescrosswell marked this pull request as ready for review October 8, 2026 01:15
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 8, 2026
@ric-oliv
ric-oliv merged commit 81ea638 into version7 Oct 8, 2026
59 of 60 checks passed
@ric-oliv
ric-oliv deleted the fix/logging-sdk-packages branch October 8, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants