dotnet-structured-logging

Design log aggregation pipelines for .NET distributed systems using ELK, Seq, or Grafana Loki.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-structured-logging-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-structured-logging
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-structured-logging
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-structured-logging-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities of managing and querying logs in distributed .NET applications, ensuring efficient data aggregation, analysis, and PII compliance.

Core Features & Use Cases

  • Log Aggregation Architecture: Design pipelines using ELK, Seq, or Grafana Loki.
  • Structured Querying: Master query patterns for different platforms to find specific information quickly.
  • PII Scrubbing: Implement strategies to mask or remove sensitive data from logs.
  • Correlation: Ensure requests can be traced across multiple services.
  • Use Case: You need to set up a centralized logging system for your microservices, ensuring that sensitive customer data is never logged and that you can easily query logs for specific TraceIds to debug issues.

Quick Start

Design a log aggregation pipeline using the OpenTelemetry Collector to route logs to Elasticsearch and Loki.

Frequently Asked Questions about dotnet-structured-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up structured logging in .NET distributed systems?

To set up structured logging in .NET distributed systems, design a log aggregation pipeline using tools like ELK, Seq, or Grafana Loki, and route logs via the OpenTelemetry Collector for efficient centralized data management and analysis.

What is the best way to scrub PII from .NET application logs?

The best way to scrub PII from .NET application logs is to implement specific masking strategies within your log pipeline, ensuring sensitive customer data is removed or masked before logs reach aggregation platforms like ELK or Seq.

How does cross-service log correlation work with W3C Trace Context in .NET?

Cross-service log correlation with W3C Trace Context in .NET works by propagating custom IDs and TraceIds across multiple services, allowing you to easily query and trace requests through the entire distributed system for debugging.

How do I query specific TraceIds in Grafana Loki or Elasticsearch?

To query specific TraceIds in Grafana Loki or Elasticsearch, use the structured query patterns designed for these aggregation platforms, which allow you to quickly find specific information and trace requests across your microservices.

When should I use log sampling strategies in .NET pipelines?

You should use log sampling strategies in .NET pipelines when managing high-volume distributed systems, as sampling reduces the amount of log data emitted and processed, ensuring efficient data management and query performance in your aggregation layer.

Can I use the OpenTelemetry Collector to route logs to both Elasticsearch and Loki?

Yes, you can use the OpenTelemetry Collector to route logs to both Elasticsearch and Loki, designing a robust log aggregation pipeline that centralizes data from your .NET distributed systems for efficient querying and analysis.