Skip to content

test(serilog): log from an app category in the ASP.NET Core logs test - #5641

Merged
jamescrosswell merged 1 commit into
version7from
test/serilog-aspnetcore-app-category
Sep 30, 2026
Merged

jamescrosswell merged 1 commit into
version7from
test/serilog-aspnetcore-app-category

Conversation

@ric-oliv

Copy link
Copy Markdown
Member

Refs #5183

AspNetCoreIntegrationTests.StructuredLogging_CapturesLogs checks 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 under App, 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

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>
@ric-oliv
ric-oliv marked this pull request as ready for review September 29, 2026 15:42
@github-actions github-actions Bot added the risk: low PR risk score: low label Sep 29, 2026
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (version7@aa02031). Learn more about missing BASE report.

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.
📢 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 merged commit 2f21e3f into version7 Sep 30, 2026
48 of 49 checks passed
@jamescrosswell
jamescrosswell deleted the test/serilog-aspnetcore-app-category branch September 30, 2026 01:10
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants