Repository navigation
Fix Sentry log category filtering - #3725
Merged
Merged
Conversation
Sentry 6.13.0 stopped applying the `Logging:Sentry:LogLevel` rules to its breadcrumb/event logger provider (getsentry/sentry-dotnet#5872), so log entries from categories such as `Microsoft` and `System` were being processed as breadcrumbs again. Apply the same rules to the provider using its type name so they continue to be respected. Assisted-by: Claude Code <noreply@anthropic.com>
martincostello
marked this pull request as ready for review
November 12, 2026 11:07
martincostello
enabled auto-merge (squash)
November 12, 2026 11:07
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the provider-specific Sentry filtering change.
No open issues 🎉
What changed in this PR
Restores Sentry breadcrumb/event category filtering after Sentry 6.13.0 removed the provider’s Sentry alias, reducing unnecessary log processing.
Changes:
- Adds the existing category thresholds under the fully qualified breadcrumb/event provider name.
- Retains
Logging:Sentryrules for the structured logs provider.
| File | Description |
|---|---|
src/API/appsettings.json |
Adds provider-specific Sentry filtering for Microsoft, Data Protection, and System log categories. |
Review effort: Balanced
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.
Apply the
Logging:Sentry:LogLevelrules to Sentry's breadcrumb/event logger provider by its type name, so that noisy log categories are filtered again.Sentry 6.13.0 includes getsentry/sentry-dotnet#5872, which removed the
Sentryalias from the breadcrumb/event logger providers. As a result, the existingLogging:Sentry:LogLevelrules now only apply to the structured logs provider, and log entries from the categories we filter are processed as breadcrumbs again. This adds allocations and CPU overhead to request processing: in a profiling comparison of another application before/after the upgrade, this showed up as ~10% more total allocations, offsetting the improvements from the upgrade.The existing
Logging:Sentrysection is retained as it still applies to the structured logs provider. The new section is keyed onSentry.AspNetCore.SentryAspNetCoreLoggerProvider(an internal Sentry type), which restores the previous filtering behaviour as the provider-specific rule takes precedence over the category-less rule that Sentry registers.🤖 Generated with Claude Code