logging

Configure Serilog structured logging and health endpoints for .NET 10 services.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/Maj3D10/Training-Platform --skill logging-maj3d10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging
Source: https://github.com/Maj3D10/Training-Platform/tree/main/.agent/skills/logging
Command: npx skills add https://github.com/Maj3D10/Training-Platform --skill logging-maj3d10

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of turning scattered application logs into reliable observability by providing structured logging, distributed tracing, and operational health signals that work together.

Core Features & Use Cases

  • Structured logging with Serilog for searchable, filterable log events enriched with useful context (e.g., machine name, application name, request details).
  • Distributed tracing and telemetry integration guidance via OpenTelemetry concepts so traces and metrics align with log correlation.
  • Health checks and correlation IDs so you can validate runtime readiness and follow a single request across logs and downstream calls in production.

Quick Start

Use the logging skill to configure Serilog structured logs, correlation ID propagation, and /health/live and /health/ready endpoints for your .NET 10 application.

Frequently Asked Questions about logging

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

FAQPage Schema
How do I configure Serilog structured logging with correlation IDs in .NET?

Configure Serilog structured logging in .NET by using LogContext enrichment to inject correlation IDs into message templates. This enables request-level diagnostics and allows you to track a single request across distributed logs and downstream calls.

When do I need separate liveness and readiness health check endpoints?

You need separate liveness and readiness health check endpoints to validate runtime readiness in production. Routing /health/live and /health/ready separately distinguishes basic application availability from dependency readiness, preventing unnecessary pod restarts.

How does OpenTelemetry distributed tracing integrate with Serilog logs?

OpenTelemetry distributed tracing integrates with Serilog by aligning trace contexts with log correlation IDs. This ensures that metrics, traces, and structured log events share consistent correlation headers for seamless observability across downstream calls.

Can I use this structured logging setup for a .NET 10 service?

Yes, this structured logging setup is specifically designed for .NET 10 services. It standardizes application logging, applies Serilog structured message templates, and ensures production readiness checks are configured correctly.

What is the best way to follow a single request across distributed application logs?

The best way to follow a single request across application logs is by propagating correlation headers. Standardizing structured logs with a correlation ID ensures every log event across downstream calls shares the same traceable identifier.

Why are my Serilog structured logs missing useful request context?

Serilog structured logs lack request context when LogContext enrichment is not configured. Enriching message templates with machine name, application name, and correlation IDs turns scattered logs into searchable, filterable observability data.