Skip to content
Agentmart
Submit a tool

serilog-observability

Configure, implement, review, and test structured Serilog observability for ASP.NET Core and .NET services.

Skill by d-trattner

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/d-trattner-serilog-observability

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Configure, implement, review, and test structured Serilog observability for ASP.NET Core and .NET services. Use for bootstrap logging, message templates, request correlation, enrichment, levels, redaction, sinks, failure handling, and shutdown. Keep domain/application code dependent on logging abstractions rather than Serilog sinks.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/serilog-observability

What's inside

Skill name
serilog-observability
Description
Configure, implement, review, and test structured Serilog observability for ASP.NET Core and .NET services. Use for bootstrap logging, message templates, request correlation, enrichment, levels, redaction, sinks, failure handling, and shutdown. Keep domain/application code dependent on logging abstractions rather than Serilog sinks.
License
MIT
Metadata
pidex-module: pidex.serilog · serilog-aspnetcore-snapshot: 10.0.0
Instructions
30 lines in SKILL.md · view on GitHub

Files (3)

  • SKILL.md
  • operations.md · references/
  • sources.md · references/

SKILL.md (first lines)

# Serilog Observability

Inspect target framework, hosting model, current `ILogger` use, configuration ownership, sinks, retention, deployment environment, privacy policy, and operational queries before changing logging.

## Ownership

Configure Serilog in host/composition root. Application code normally uses `Microsoft.Extensions.Logging.ILogger<T>`; domain logic should not depend on logging infrastructure. Keep one logger lifecycle and avoid duplicate providers/events.

## Structured events

- Use stable message templates and named properties: `"Processed {OrderCount} orders for {TenantId}"`, not interpolated strings.
- Events describe outcomes; property names form queryable schema. Keep names/types stable.
- Add correlation/trace/request identifiers through context/enrichers at boundaries, not repeated parameters everywhere.
- Select levels by operational meaning. Expected validation failure is not an error; unavailable dependency may be warning/error according to handling and SLO.
- Record exception object with context once at owning boundary. Avoid catch-log-rethrow duplication.
- Bound collections, bodies, headers, and destructuring. Never log passwords, tokens, connection strings, keys, raw authorization headers, personal data, or unrestricted request/response payloads.

## ASP.NET Core

Use request logging once with correlation and useful completion properties. Place middleware so timing/status ownership is correct and health/static noise can be controlled. Trust proxy headers only from configured proxies. Enrich identity/tenant only after validated authentication and privacy review.

## Sinks and lifecycle

Choose sinks by operations need, delivery semantics, backpressure, failure behavior, retention, and cost. Do not make request success depend on an unavailable remote sink unless explicitly required. Bound async queues and define loss behavior. Environment configuration selects endpoints/credentials; source contains none.

Initialize bootstrap logging only when early startup diagnostics are needed, replace it with final host configuration, and flush/dispose during controlled shutdown. Never claim delivery after abrupt process termination.

Test event level, template/property presence, correlation and redaction using controlled in-memory capture; avoid assertions on rendered prose alone. Review [operations](references/operations.md) and [sources](references/sources.md). Guidance only: no sink activation or secret access.

From d-trattner/pidex, MIT.

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Sep 6, 2026 (1 month ago)
Last release
Oct 14, 2026 (14 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from d-trattner

Cite this page

serilog-observability skill. Agent Mart. https://agentmart.dev/skills/d-trattner-serilog-observability (last updated 2026-10-24)