Repository navigation
docs(samples): add READMEs for the ASP.NET Core MVC and Serilog samples - #6057
Conversation
Closes #772 Co-Authored-By: Claude <noreply@anthropic.com>
PR risk: lowFor commit This label is a hint for reviewers, not an approval. |
There was a problem hiding this comment.
Good to approve and merge
Adds READMEs for the two samples named in #772 (MVC rewritten, Serilog new), which closes the issue. The latest commit drops TracesSampleRate from the Serilog sample's appsettings.json, which matches the code: the sample never adds routing, so no transactions are sent, and the README no longer claims any. Routes, ports, options, DSN instructions and the described Sentry output match each sample's code at this head.
This is an automated preliminary review.
- Mention the 'Param is null!' warning event the Home form and AJAX post also send. - DiagnosticLevel is Error, so Debug only prints the SDK's errors. - Align the appsettings.json DSN comment with the Serilog sample's. 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 @@
## main #6057 +/- ##
==========================================
+ Coverage 78.32% 78.52% +0.20%
==========================================
Files 537 539 +2
Lines 20134 20194 +60
Branches 4055 4062 +7
==========================================
+ Hits 15769 15857 +88
+ Misses 3517 3491 -26
+ Partials 848 846 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Serilog sample sends no transactions: it never calls UseRouting. - Capture page doesn't show the event ID. - DSN comments in appsettings.json point at SENTRY_DSN or SamplesShared.cs. - Suggest DiagnosticLevel Info, since Debug is filtered by ILogger after startup. - Mention the HTTPS-redirect warning, Serilog structured logs, and that static files and 404s don't send transactions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| // Enable Sentry tracing features | ||
| "TracesSampleRate": 1.0, |
There was a problem hiding this comment.
Now that the README doesn't mention tracing, this is the one place left that suggests the sample sends transactions, and it doesn't (no UseRouting, so no tracing middleware). Drop it?
| // Enable Sentry tracing features | |
| "TracesSampleRate": 1.0, |
The sample never adds routing, so the tracing middleware never runs and no transactions are sent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Two of the most visited samples in the repo had little or no README. This adds one to each, modelled on the Log4Net sample's:
Sentry.Samples.AspNetCore.Mvc: replaces the short blocking-detection note with an overview of what the sample shows (errors, logging, tracing, blocking detection, event processors, user feedback, tunneling), how to run it, and a table of each page/route and what it sends to Sentry.Sentry.Samples.AspNetCore.Serilog: new README covering the earlySentrySdk.Init, the Serilog sink levels, how to run it, and its/greetingsand/throwroutes.Both explain the two ways to supply a DSN that the samples actually support (
SENTRY_DSNat build time, orSamplesShared.cs). The old MVC README pointed atSentry:Dsninappsettings.json, which the sample overrides in code.Notes for review:
#skip-changelog
Closes #772
🤖 Generated with Claude Code