agentleFS
mag1artmag1art/skills/dotnet-observability/SKILL.md

dotnet-observability

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Use for production logging, tracing, metrics, health checks, and diagnostics in C#/.NET services.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use for logs, metrics, distributed traces, health endpoints, correlation, diagnostics, and production incident analysis.

    line 27
  2. Distinctive:

    Do not add telemetry blindly or log sensitive data merely to increase volume.

    line 31
  3. Distinctive:

    Use structured templates with stable property names, not interpolated message strings.

    line 35
  4. Distinctive:

    Never log passwords, tokens, cookies, connection strings, full request bodies, or unnecessary PII.

    line 37
  5. Distinctive:

    Avoid duplicate exception logging at multiple boundaries.

    line 40
  6. Distinctive:

    Use OpenTelemetry for cross-service HTTP, database, messaging, and background-work traces.

    line 44
  7. Distinctive:

    Add low-cardinality useful tags such as service, operation, outcome, and dependency.

    line 46
  8. Distinctive:

    Do not put unbounded values or sensitive data into metric labels.

    line 47
  9. Very specific:

    Use counters for totals, histograms for duration/size/latency, and gauges only for current state.

    line 51
  10. Distinctive:

    Verify correlation across logs/traces, useful dashboards and alerts, redaction, cardinality, sampling, health semantics, and graceful …

    line 55
  11. Distinctive:

    Use stable metric names and low-cardinality labels.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

.NET Observability

When to Use

Use for logs, metrics, distributed traces, health endpoints, correlation, diagnostics, and production incident analysis.

When Not to Use

Do not add telemetry blindly or log sensitive data merely to increase volume.

Logging

  • Use structured templates with stable property names, not interpolated message strings.
  • Log business milestones, durations, outcomes, retry count, and stable entity IDs.
  • Never log passwords, tokens, cookies, connection strings, full request bodies, or unnecessary PII.
  • Separate operational errors from expected business failures.
  • Configure sinks and retention for the actual environment.
  • Avoid duplicate exception logging at multiple boundaries.

Tracing

  • Use OpenTelemetry for cross-service HTTP, database, messaging, and background-work traces.
  • Propagate W3C trace context across HTTP and message headers.
  • Add low-cardinality useful tags such as service, operation, outcome, and dependency.
  • Do not put unbounded values or sensitive data into metric labels.

Metrics and Health

Use counters for totals, histograms for duration/size/latency, and gauges only for current state. Define units and names consistently. Separate liveness from readiness; protect detailed health output.

Quality Gate

Verify correlation across logs/traces, useful dashboards and alerts, redaction, cardinality, sampling, health semantics, and graceful telemetry shutdown.

Example: OpenTelemetry Setup

builder.Logging.AddJsonConsole();

builder.Services.AddOpenTelemetry()
    .ConfigureResource(r => r.AddService(builder.Environment.ApplicationName))
    .WithMetrics(m => m
        .AddAspNetCoreInstrumentation()
        .AddHttpClientInstrumentation()
        .AddRuntimeInstrumentation())
    .WithTracing(t => t
        .AddAspNetCoreInstrumentation()
        .AddHttpClientInstrumentation()
        .AddEntityFrameworkCoreInstrumentation()
        .AddOtlpExporter());

Use stable metric names and low-cardinality labels. Add request duration and dependency failure metrics, but never use user IDs, URLs with unbounded values, tokens, or full exception text as metric labels.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.