Observability overview and glue for .NET 10: how the pieces fit together, plus the cross-cutting parts owned here — ASP.NET health check endpoints (/health), correlation IDs, and log-level strategy.

MITAuto-check passedDevOps & Cloud

Install Logging

skills CLI
$ npx skills add codewithmukesh/dotnet-claude-kit --skill logging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codewithmukesh/dotnet-claude-kit logging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/logging .claude/skills/logging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
logging
GitHub stars
751
Token cost
~1.6k tokens
SKILL.md length
408 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Observability overview and glue for .NET 10: how the pieces fit together, plus the cross-cutting parts owned here — ASP.NET health check endpoints (/health), correlation IDs, and log-level strategy.

  • Works in 4 steps: Structured logging with Serilog — Every… → OpenTelemetry for distributed tracing —… → Health checks for operational readiness… → …
  • Monitoring setup
  • SKILL.md covers Core Principles, Patterns, Anti-patterns and Decision Guide
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Logging is an agent skill from codewithmukesh/dotnet-claude-kit. Observability overview and glue for .NET 10: how the pieces fit together, plus the cross-cutting parts owned here — ASP.NET health check endpoints (/health), correlation IDs, and log-level strategy. For deep Serilog setup load serilog; for traces and metrics load opentelemetry. Load this skill when setting up observability from scratch, wiring health check endpoints or correlation IDs, or when the user says "logging", "observability", "monitoring setup", "liveness", "readiness", or "ILogger".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Observability. It works with OpenTelemetry, ASP.NET Core and .NET. The repository describes itself as: Make Claude Code a .NET 10 Expert. The licence is MIT.

When your agent uses it

  • Monitoring setup
  • Tasks that involve Observability

Example prompts

  • “logging”
  • “observability”
  • “monitoring setup”
  • “/logging”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Structured logging with Serilog — Every log entry is a structured event with named properties, not a formatted string. This enables…
  2. OpenTelemetry for distributed tracing — Traces connect requests across services; metrics track system health over time. Full setup lives…
  3. Health checks for operational readiness — Every service exposes /health endpoints for load balancers and orchestrators. Liveness and…
  4. Correlation IDs for request tracing — Every request gets a unique ID that flows through all log entries and downstream service calls, so…

What it can do on your machine

Read from SKILL.md and the folder at commit 2330089. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Logging loads about 1.6k tokens when it runs. Until then it costs about 127 tokens; SKILL.md has 408 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~127
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codewithmukesh/dotnet-claude-kit at commit 2330089, republished under its MIT licence (© codewithmukesh). 408 words, ~1,595 tokens.

Download SKILL.mdSave it as .claude/skills/logging/SKILL.md (or your agent's skills folder).
name
logging
description
Observability overview and glue for .NET 10: how the pieces fit together, plus the cross-cutting parts owned here — ASP.NET health check endpoints (/health), correlation IDs, and log-level strategy. For deep Serilog setup load `serilog`; for traces and metrics load `opentelemetry`. Load this skill when setting up observability from scratch, wiring health check endpoints or correlation IDs, or when the user says "logging", "observability", "monitoring setup", "liveness", "readiness", or "ILogger".

Logging & Observability

Core Principles

  1. 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's AddSerilog()-over-UseSerilog() guidance is canonical.
  2. OpenTelemetry for distributed tracing — Traces connect requests across services; metrics track system health over time. Full setup lives in the opentelemetry skill.
  3. Health checks for operational readiness — Every service exposes /health endpoints for load balancers and orchestrators. Liveness and readiness are separate questions and separate endpoints.
  4. 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
ConcernOwnerSkill
Structured application logsSerilog (AddSerilog())serilog
Request summary loggingUseSerilogRequestLogging()serilog
Traces + metrics + OTLP exportOpenTelemetry SDKopentelemetry
Health endpoints, correlation IDs, log-level strategyThis skilllogging

Wire logging first (you need logs to debug the rest), then health checks, then tracing.

Correlation IDs
csharp
// Middleware to set correlation ID
public class CorrelationIdMiddleware(RequestDelegate next)
{
    private const string CorrelationIdHeader = "X-Correlation-Id";

    public async Task InvokeAsync(HttpContext context)
    {
        var correlationId = context.Request.Headers[CorrelationIdHeader].FirstOrDefault()
            ?? Guid.NewGuid().ToString();

        context.Items["CorrelationId"] = correlationId;
        context.Response.Headers[CorrelationIdHeader] = correlationId;

        using (LogContext.PushProperty("CorrelationId", correlationId))
        {
            await next(context);
        }
    }
}

// Program.cs — register early so every downstream log carries the ID
app.UseMiddleware<CorrelationIdMiddleware>();

Why middleware: pushing the property once at the pipeline edge attaches it to every log event in the request scope — no per-call-site plumbing. Propagate the same header on outgoing HttpClient calls via a DelegatingHandler (see the httpclient-factory skill).

Health Checks
csharp
// Program.cs
builder.Services.AddHealthChecks()
    .AddNpgSql(builder.Configuration.GetConnectionString("Default")!,
        name: "database", tags: ["ready"])
    .AddRedis(builder.Configuration.GetConnectionString("Redis")!,
        name: "redis", tags: ["ready"])
    .AddRabbitMQ(builder.Configuration.GetConnectionString("RabbitMq")!,
        name: "rabbitmq", tags: ["ready"]);

// Map endpoints
app.MapHealthChecks("/health/live", new HealthCheckOptions
{
    Predicate = _ => false // No dependency checks — just "am I running?"
});

app.MapHealthChecks("/health/ready", new HealthCheckOptions
{
    Predicate = check => check.Tags.Contains("ready")
});

Why two endpoints: liveness failing means "restart me"; readiness failing means "stop sending traffic". Conflating them makes a slow database restart your app in a loop.

Show full SKILL.md (162 more words)Show less
Log-Level Strategy
LevelUse forEnvironment default
DebugDiagnostic detail, payload dumps (never PII in prod)Development only
InformationBusiness events: order placed, job completedDev + staging
WarningRecoverable anomalies: retry fired, fallback usedEverywhere — production default
ErrorFailed operations that need attentionEverywhere
Fatal/CriticalApp cannot continueEverywhere

Why Warning as the production default: Information-level request noise at scale costs real money in log storage and drowns the signals. Keep Information for genuine business events via namespace overrides (see the serilog skill's MinimumLevel.Override pattern).

Anti-patterns

Don't Log Sensitive Data
csharp
// BAD — logging credentials
logger.LogInformation("User logged in: {Email} with password {Password}", email, password);

// GOOD — log identifiers, never secrets or PII at Information level
logger.LogInformation("User {UserId} logged in", userId);
Don't Skip Health Check Tags
csharp
// BAD — all checks run for liveness AND readiness
app.MapHealthChecks("/health");

// GOOD — separate liveness (am I running?) from readiness (can I serve traffic?)
app.MapHealthChecks("/health/live", new() { Predicate = _ => false });
app.MapHealthChecks("/health/ready", new() { Predicate = c => c.Tags.Contains("ready") });
Don't Re-Implement What the Owning Skill Provides
csharp
// BAD — hand-rolling Serilog bootstrap here from memory
builder.Host.UseSerilog(...);  // legacy API — the serilog skill forbids this

// GOOD — load the serilog skill and use its two-stage AddSerilog() bootstrap
builder.Services.AddSerilog((services, lc) => lc.ReadFrom.Configuration(builder.Configuration)...);

Decision Guide

ScenarioRecommendation
Application logging setupLoad serilog — AddSerilog() two-stage bootstrap
Distributed tracing / metricsLoad opentelemetry — OTLP exporter
Custom business metricsIMeterFactory + counters/histograms (opentelemetry skill)
Request tracingCorrelation ID middleware (this skill)
Container health/health/live and /health/ready endpoints (this skill)
Log storageSeq (development), Elastic/Grafana/OTLP backend (production)
Log levelsDebug in dev, Information in staging, Warning default in production

© codewithmukesh, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/logging of codewithmukesh/dotnet-claude-kit.

Open the folder on GitHubat commit 2330089

Compare with similar skills

Logging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Logging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logging this skillcodewithmukesh/dotnet-claude-kit751—~1.6kAutomated safety check: PassMIT
Opentelemetry Net InstrumentationAaronontheweb/dotnet-skills1.2k—~6.9kAutomated safety check: PassMIT
Otel Dotnetollygarden/opentelemetry-agent-skills106—~988Automated safety check: PassApache-2.0
Aspire Service DefaultsAaronontheweb/dotnet-skills1.2k1 repos~2.6kAutomated safety check: PassMIT
Otel Instrumentationatherio-danp/cde-dotnetcc109—~1.3kAutomated safety check: NotesNone
Dotnet Devopsnovotnyllc/dotnet-artisan233—~1.1kAutomated safety check: PassMIT

Similar skills

  • Opentelemetry Net Instrumentation

    Aaronontheweb/dotnet-skills

    Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup…

    1.2k GitHub stars~6.9k tokensUpdated 20 days ago
    DevOps & CloudAuto-check passed
  • Otel Dotnet

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry in .NET — DI/builder SDK setup (OpenTelemetry.Extensions.Hosting, AddOpenTelemetry, UseOtlpExporter, OpenTelemetrySdk.Create), native .NET instrumentation APIs (ActivitySource…

    106 GitHub stars~988 tokensUpdated 4 days ago
    DevOps & CloudAuto-check passed
  • Aspire Service Defaults

    Aaronontheweb/dotnet-skills

    Sets up a shared ServiceDefaults project for .NET Aspire apps that centralizes OpenTelemetry, health checks, HTTP resilience and service discovery for every service.

    1.2k GitHub starsUsed in 1 repo~2.6k tokens
    DevOps & CloudAuto-check passed
  • Otel Instrumentation

    atherio-danp/cde-dotnetcc

    Add or change OpenTelemetry tracing, metrics, and structured logging in the .NET API (apps/api) — OTLP exporter setup, custom ActivitySource spans, IMeterFactory metrics, log/trace correlation.

    109 GitHub stars~1.3k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check: notes
  • Dotnet Devops

    novotnyllc/dotnet-artisan

    Configures .NET CI/CD pipelines (GitHub Actions with setup-dotnet, NuGet cache, reusable workflows; Azure DevOps with DotNetCoreCLI, templates, multi-stage), containerization (multi-stage…

    233 GitHub stars~1.1k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Logging

    Resgrid/Core

    Observability for .NET 10 applications. An agent skill from Resgrid/Core.

    229 GitHub stars~1.4k tokensUpdated today
    DevOps & CloudAuto-check passed

More from codewithmukesh/dotnet-claude-kit

All 47 skills in this repo
  • API Versioning

    codewithmukesh/dotnet-claude-kit

    API versioning strategies for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.2k tokens
    Auto-check passed
  • Scaffold

    codewithmukesh/dotnet-claude-kit

    Architecture-aware feature scaffolding for .NET 10 projects.

    751 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Architecture Advisor

    codewithmukesh/dotnet-claude-kit

    Architecture selection advisor for .NET applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~2.9k tokens
    Auto-check passed
  • Aspire

    codewithmukesh/dotnet-claude-kit

    .NET Aspire for cloud-native orchestration. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Authentication

    codewithmukesh/dotnet-claude-kit

    Authentication and authorization for ASP.NET Core. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Caching

    codewithmukesh/dotnet-claude-kit

    Caching strategies for .NET 10 applications. An agent skill from codewithmukesh/dotnet-claude-kit.

    751 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Categories

Questions about Logging

What does Logging do?

Observability overview and glue for .NET 10: how the pieces fit together, plus the cross-cutting parts owned here — ASP.NET health check endpoints (/health), correlation IDs, and log-level strategy. Logging is an agent skill from codewithmukesh/dotnet-claude-kit.NET health check endpoints (/health), correlation IDs, and log-level strategy.

When should I use Logging?

Logging fits situations like: monitoring setup; tasks that involve Observability.

How do I install Logging in Claude Code?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill logging -a claude-code`. Or copy the skill folder (skills/logging in codewithmukesh/dotnet-claude-kit) into .claude/skills/logging in your project. Claude Code loads it when a task matches its description.

How do I install Logging in Codex?

Run `npx skills add codewithmukesh/dotnet-claude-kit --skill logging -a codex`. Or copy the skill folder (skills/logging in codewithmukesh/dotnet-claude-kit) into .agents/skills/logging in your project. Codex loads it when a task matches its description.

Can I use Logging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewithmukesh/dotnet-claude-kit --skill logging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logging, .gemini/skills/logging, .github/skills/logging and .opencode/skills/logging in your project.

What does Logging need to run?

SKILL.md names no scripts, command-line tools or credentials: Logging is instructions for the agent only.

Does Logging access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Logging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Logging use?

Logging is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Logging use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Logging?

Skills that share tags, products or a category with Logging: Opentelemetry Net Instrumentation (Aaronontheweb/dotnet-skills, 1.2k stars), Otel Dotnet (ollygarden/opentelemetry-agent-skills, 106 stars), Aspire Service Defaults (Aaronontheweb/dotnet-skills, 1.2k stars) and Otel Instrumentation (atherio-danp/cde-dotnetcc, 109 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Logging?

codewithmukesh (a GitHub organization) maintains it in codewithmukesh/dotnet-claude-kit, which has 751 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on August 7, 2026.

Source: codewithmukesh/dotnet-claude-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.