| name | dotnet-observability |
| category | operations |
| subcategory | ci-cd |
| description | Adds observability. OpenTelemetry traces/metrics/logs, health checks, custom metrics. |
| license | MIT |
| targets | ["*"] |
| tags | ["architecture","dotnet","skill"] |
| version | 0.0.1 |
| author | dotnet-agent-harness |
| invocable | true |
| claudecode | {"allowed-tools":["Read","Grep","Glob","Bash","Write","Edit"]} |
| codexcli | {"short-description":".NET skill guidance for architecture tasks"} |
| opencode | {"allowed-tools":["Read","Grep","Glob","Bash","Write","Edit"]} |
| copilot | {} |
| geminicli | {} |
| antigravity | {} |
dotnet-observability
Modern observability for .NET applications using OpenTelemetry, structured logging, health checks, and custom metrics.
Covers the three pillars of observability (traces, metrics, logs), integration with Microsoft.Extensions.Diagnostics
and System.Diagnostics, and production-ready health check patterns.
Scope
- OpenTelemetry traces, metrics, and logs setup
- Health check endpoints and liveness/readiness patterns
- Custom metrics with System.Diagnostics.Metrics
- Structured logging integration with OTel export
Out of scope
- DI container mechanics and service lifetimes -- see [skill:dotnet-csharp-dependency-injection]
- Async/await patterns -- see [skill:dotnet-csharp-async-patterns]
- Testing observability output -- see [skill:dotnet-integration-testing]
- Middleware pipeline patterns (request logging, exception handling) -- see [skill:dotnet-middleware-patterns]
Cross-references: [skill:dotnet-csharp-dependency-injection] for service registration,
[skill:dotnet-csharp-async-patterns] for async patterns in background exporters, [skill:dotnet-resilience] for Polly
telemetry integration, [skill:dotnet-middleware-patterns] for request/exception logging middleware.
OpenTelemetry Setup
OpenTelemetry is the standard observability framework in .NET. The .NET SDK includes native support for
System.Diagnostics.Activity (traces) and System.Diagnostics.Metrics (metrics), which OpenTelemetry collects and
exports.
Package Landscape
| Package | Purpose |
|---|
OpenTelemetry.Extensions.Hosting | Host integration, lifecycle management |
OpenTelemetry.Instrumentation.AspNetCore | Automatic HTTP server trace/metric instrumentation |
OpenTelemetry.Instrumentation.Http | Automatic HttpClient trace/metric instrumentation |
OpenTelemetry.Instrumentation.Runtime | GC, thread pool, assembly metrics |
OpenTelemetry.Exporter.OpenTelemetryProtocol | OTLP exporter (gRPC/HTTP) for collectors |
OpenTelemetry.Exporter.Console | Console exporter for local development |
Install the core stack: