logging-observability

Implement structured logging with Serilog and correlation IDs for .NET Core Razor Pages.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ojrojas/AgentsInstructions --skill logging-observability-ojrojas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-observability
Source: https://github.com/ojrojas/AgentsInstructions/tree/main/.claude/skills/logging-observability
Command: npx skills add https://github.com/ojrojas/AgentsInstructions --skill logging-observability-ojrojas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Serilog.AspNetCore, Serilog.Expressions, Serilog.Sinks.Seq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges of implementing effective logging and observability in .NET Core Razor Pages applications, ensuring troubleshooting capabilities and integration with monitoring systems.

Core Features & Use Cases

  • Structured Logging: Implements structured logging with Serilog for machine parsing and troubleshooting.
  • Correlation IDs: Ensures every request gets a unique ID for end-to-end tracing.
  • Contextual Enrichment: Adds relevant context to logs for better troubleshooting.
  • Log Levels: Utilizes appropriate log levels for clear and actionable information.
  • External Sinks: Sends logs to centralized systems like Seq, Datadog, or CloudWatch.
  • Use Case: Ideal for setting up structured logging, implementing distributed tracing, and configuring health checks in .NET 8+ applications.

Quick Start

Configure the logging-observability skill in your .NET Core Razor Pages project to enable production-grade observability and monitoring.

Frequently Asked Questions about logging-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement structured logging in .NET Core Razor Pages?

Structured logging in .NET Core Razor Pages is implemented using Serilog to enable machine-parsing of log events. This Skill configures contextual enrichment and appropriate log levels for actionable troubleshooting information.

How do I set up distributed tracing with correlation IDs in a .NET 8 application?

Distributed tracing in a .NET 8 application is set up by assigning a unique correlation ID to every request for end-to-end tracing. This ensures logs can be tracked across the entire request lifecycle.

Does this structured logging configuration support sending logs to Seq?

Yes, this structured logging configuration supports sending logs to Seq. It uses Serilog.Sinks.Seq to route log events to centralized monitoring systems like Seq for aggregation and analysis.

What is the best way to add health checks and observability to .NET Core?

Adding health checks and observability to .NET Core is best achieved by integrating structured logging with monitoring systems. This Skill implements health checks alongside Serilog logging for production-grade monitoring.

Can I use Serilog for contextual enrichment without external monitoring sinks?

Yes, you can use Serilog for contextual enrichment without external sinks, though integration with centralized systems is recommended. This Skill enriches logs with relevant context for local troubleshooting and external monitoring.

Why do I need correlation IDs for troubleshooting .NET Core applications?

Correlation IDs are needed for troubleshooting .NET Core applications because they provide a unique identifier for each request. This allows you to trace end-to-end log events across distributed components.