Agent skill
logging-telemetry
Configure structured logging and telemetry for the .NET 8 WPF widget host app using Serilog, ETW, and Application Insights. Use when wiring logging sinks, correlation IDs, PII redaction, error reporting, and diagnostics exports.
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/logging-telemetry
SKILL.md
Logging Telemetry
Overview
Set up structured logs and telemetry that are safe, correlated, and useful for diagnosing widget issues.
Constraints
- .NET 8
- Serilog for structured logging
- ETW for local diagnostics
- Application Insights for telemetry
Definition of done (DoD)
- Serilog configured with file sink (rolling, 7-day retention)
- Correlation IDs present on user-initiated actions
- No PII or secrets in logs (verify before merge)
- Structured properties used instead of string interpolation
- Application Insights wired when connection string available
- Log levels appropriate (Debug for verbose, Warning+ for production noise)
Workflow
- Define log levels and categories (UI, sync, data, widgets).
- Configure Serilog sinks and enrichers.
- Add correlation IDs per user action or sync cycle.
- Redact or hash PII before logging.
- Wire Application Insights for events, traces, and exceptions.
Guidance
- Do not log secrets or full payloads.
- Prefer structured properties over string interpolation.
- Keep noisy logs at Debug.
References
references/serilog.mdfor sink and enricher setup.references/appinsights.mdfor telemetry wiring.references/pii-handling.mdfor redaction rules.references/correlation.mdfor correlation IDs and scopes.
Didn't find tool you were looking for?