test(serilog): log from an app category in the ASP.NET Core logs test - #5641
Merged
Merged
Conversation
StructuredLogging_CapturesLogs logged under its test class's category, which starts with Sentry.Serilog. The Serilog sink skips SDK categories, so the test only passed because the ASP.NET Core MEL provider captured the log too. Log under "App" so the test covers the sink once that provider is off by default. Refs #5183 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version7 #5641 +/- ##
===========================================
Coverage ? 74.76%
===========================================
Files ? 515
Lines ? 18905
Branches ? 3689
===========================================
Hits ? 14135
Misses ? 3892
Partials ? 878 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
approved these changes
Sep 30, 2026
ric-oliv
added a commit
that referenced
this pull request
Sep 30, 2026
StructuredLogging_CapturesLogs logged under its test class's category, which starts with Sentry.Serilog. The Serilog sink skips SDK categories, so the test only passed because the ASP.NET Core MEL provider captured the log too. Log under "App" so the test covers the sink once that provider is off by default. Refs #5183 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2f21e3f)
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.
Refs #5183
AspNetCoreIntegrationTests.StructuredLogging_CapturesLogschecks that the Serilog sink captures logs in an ASP.NET Core app. It logged under its test class's category,Sentry.Serilog.Tests.AspNetCoreIntegrationTests. The sink skips categories under the SDK's own namespaces, so the only copy of that log came from the ASP.NET Core MEL provider. The test now logs underApp, which the sink captures.The upcoming change that turns the ASP.NET Core MEL provider off by default for #5183 depends on this. Without it, this test fails.
#skip-changelog
🤖 Generated with Claude Code