agentleFS
pabloleonalcaidepabloleonalcaide/development-skills/skills/observability/SKILL.md

observability

Skill1 starsChanged 36 days agoMITView on GitHub

Instrument code so production behavior is visible and diagnosable — structured logs with correlation ids, metrics, traces, symptom-based alerts and minimal runbooks. Use when adding an endpoint, job, cron, queue consumer or third-party integration, when a production issue was hard to diagnose, or when the user asks for logging, metrics, tracing, dashboards or alerts. Invoked by /develop when the blueprint declares observability impact.

87 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use gitops, background-jobs and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • kcns008Skill

    gitops

    GitOps Agent (Flow) — manages ArgoCD applications, Helm charts, Kustomize overlays, deployment strategies (canary, blue-green, rolling), multi-cluster GitOps, and drift detection for Kubernetes and OpenShift clusters.

    Also in 4 projects that use this

  • YepAPISkill

    background-jobs

    Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

    Also in 4 projects that use this

  • Mushfiqur-Rahman-RobinSkill

    rag-systems

    Best practices for building Retrieval-Augmented Generation systems — chunking, embedding, hybrid retrieval, reranking, indexing, caching, evaluation, observability — plus a catalog of RAG patterns and when each applies.

    Also in 3 projects that use this

  • YepAPISkill

    data-pipelines

    ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.

    Also in 4 projects that use this

  • wpankSkill

    caching

    Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.

    Also in 5 projects that use this

  • JohnJBorenSkill

    ci-cd

    CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies

    Also in 13 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 70 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Define "working" first: Write 2-4 questions the on-call will ask about this code at 3 a.m.: "Did last night's run process every record?", …

    line 18

“Common” is measured: kept by at least 6 in 10 of the 70 edited versions of this file we could read. “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

Observability

Instrument for the questions the on-call will ask, not for the code you wrote. Metrics tell you that something is wrong, traces tell you where, logs tell you why.

When NOT to use

  • Temporary debug logging while diagnosing a bug — that is diagnose (tagged logs, removed after).
  • Pure refactors with no new entry point or integration.

Process

  1. Define "working" first. Write 2-4 questions the on-call will ask about this code at 3 a.m.: "Did last night's run process every record?", "Are payments to provider X failing?", "Which tenant is slow?". Every signal you add must answer one of them; drop the rest.
  2. Structured logs, one event per meaningful step. JSON, stable field names, a level that means something (error = someone must act). Every line carries:
    • a correlation id propagated across calls and queue hops;
    • an entryPoint field when several origins (HTTP, cron, consumer) write to the same sink — so a line can be traced to what started it;
    • the business identifiers needed to act (ids, not personal data).
  3. Metrics: RED for services, USE for resources. Rate, Errors, Duration per endpoint/job; Utilization, Saturation, Errors for pools and queues. Report latency as percentiles (p50/p95/p99), never averages.
  4. Watch cardinality. Labels are bounded sets (endpoint, status class, provider). Never a label per user, tenant, id or free text — that belongs in logs or trace attributes.
  5. Traces at the boundaries. A span per inbound request, outbound call and queue hop, with the correlation id; prefer the platform's OpenTelemetry setup over hand-rolled timing.
  6. Alert on symptoms, not causes. Two severities: page (users are hurting now) and ticket (will hurt soon). Every alert gets a 3-line runbook: what it means, first check, who owns it.
  7. Verify the telemetry itself. Trigger each new log, metric and alert once (in a test, staging or a dry run) and confirm it arrives where the on-call will look.

Common Rationalizations

RationalizationReality
"We'll add logs when something breaks"When it breaks you need the logs from before it broke.
"Log everything, we'll grep later"Noise hides the signal and the bill grows; log what answers the on-call's questions.
"The average latency is fine"Averages hide the tail; the p99 is what your slowest users feel.
"Add the user id as a label, it's handy"Unbounded cardinality explodes the metrics backend. Put it in the log line.
"The alert is configured, done"An alert never fired is an alert never tested. Fire it once.

Red Flags

  • A new cron, job or consumer that logs nothing on success — you can't tell "ran fine" from "didn't run".
  • console.log / unstructured strings in production code.
  • A catch block that logs without the correlation id or the identifiers needed to act.
  • Personal data or secrets in log lines.
  • An alert without a runbook or owner.

Verification

  • The on-call questions are written down and each one is answerable from the new signals
  • Logs are structured, carry correlation id (and entryPoint if the sink is shared), no PII
  • Metric labels are bounded; latency as percentiles
  • Each new alert has severity, runbook and owner, and was fired once

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.