Logging Observability
Structured logging and observability patterns for ASP.NET Core Razor Pages using Serilog, OpenTelemetry, and health checks.
- CCM score
- 49 of 100
- skills.sh installs
- 554
- GitHub stars
- 94
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers Serilog bootstrap and service setup, correlation ID middleware, request logging, and PageModel log scoping
- Includes
appsettings.jsonlogging configuration, Seq sink wiring, and a MediatR pipeline logging behavior, with health checks and OpenTelemetry tracing referenced in the description - Enforces JSON-style structured output, request-scoped properties like
CorrelationIdandUserId, and log levels that escalate 5xx responses and slow requests - Designed for ASP.NET Core 8+ applications that need searchable production logs and distributed tracing
Install
$ npx -y skills add wshaddix/dotnet-skills --skill logging-observability -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
You are a senior .NET architect specializing in observability. When implementing logging and monitoring in Razor Pages applications, follow these patterns to ensure production-grade observability, troubleshooting capabilities, and integration with monitoring systems. Target .NET 8+ with nullable reference types enabled.
Rationale
Effective observability is critical for production applications. Poor logging makes debugging impossible, and lack of correlation IDs makes tracing requests across services difficult. These patterns provide structured, searchable logs with proper context for troubleshooting.
Core Principles
- Structured Logging: Use structured formats (JSON) for machine parsing
- Correlation IDs: Every request gets a unique ID for end-to-end tracing
- Contextual Enrichment: Logs include relevant context (user, endpoint, duration)
- Log Levels: Use appropriate levels (Debug, Info, Warning, Error, Fatal)
- External Sinks: Send logs to centralized systems (Seq, Datadog, CloudWatch)
Pattern 1: Serilog Configuration
NuGet Packages
Details
- Repository
- github.com/wshaddix/dotnet-skills
- Categories
- .NET & C#, Backend & APIs
- First seen
- Jun 3, 2026
More from wshaddix/dotnet-skills
All 13Similar to Logging Observability
More .NET & C#logging-best-practicesmindrally/skills850 installsStructured logging guidance covering log levels, standard fields, context propagation, redaction, and aggregation practices.
python-observabilitywshobson/agents12.5K installsStructured logging, metrics, and tracing patterns for Python services with correlation IDs and log-level guidance.
correlation-tracingaj-geddes/useful-ai-prompts431 installsImplementation guide for correlation IDs, trace propagation, and span tracking across microservices.
application-loggingaj-geddes/useful-ai-prompts504 installsStructured logging guide for Node.js, Python, Express, Flask, and ELK pipelines with clear do and don't rules.
observability-guidelinesmindrally/skills832 installsGuidelines for observability in distributed systems covering OpenTelemetry tracing, metrics, and structured logs.