logging
Installation
SKILL.md
Logging & Observability
Core Principles
- Structured logging with Serilog — Every log entry is a structured event with named properties, not a formatted string. This enables searching, filtering, and alerting. All setup (two-stage bootstrap,
AddSerilog(), sinks, enrichers) lives in the serilog skill — that skill'sAddSerilog()-over-UseSerilog()guidance is canonical. - OpenTelemetry for distributed tracing — Traces connect requests across services; metrics track system health over time. Full setup lives in the opentelemetry skill.
- Health checks for operational readiness — Every service exposes
/healthendpoints for load balancers and orchestrators. Liveness and readiness are separate questions and separate endpoints. - Correlation IDs for request tracing — Every request gets a unique ID that flows through all log entries and downstream service calls, so one user complaint maps to one filtered log stream.
Patterns
How the Pieces Fit Together
| Concern | Owner | Skill |
|---|---|---|
| Structured application logs | Serilog (AddSerilog()) |
serilog |
| Request summary logging | UseSerilogRequestLogging() |
serilog |
| Traces + metrics + OTLP export | OpenTelemetry SDK | opentelemetry |
| Health endpoints, correlation IDs, log-level strategy | This skill | logging |