instrument-observability
Skill45 starsChanged 4 days agoMITView on GitHub
Instrument a change with structured logging, RED metrics, trace spans, and symptom-based alerts - use while building the change, not after an incident proves it was unobservable
1 other project uses a version of this.
Adopted by
Most recently taken up by
- microsoft/agent365-skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- microsoft/agent365-skills★ 50same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- build-unplannedSkill
- check-specs-alignmentSkill
- create-tasksSkill
- debugSkill
- design-architectureSkill
- design-it-twiceSkill
- design-productSkill
- domain-modelingSkill
- doubt-driven-developmentSkill
- finalize-taskSkill
- groundwork-checkSkill
- groundwork-helpSkill
- handoffSkill
- implement-taskSkill
- just-do-itSkill
- just-do-it-swarmingSkill
- plan-taskSkill
- review-prSkill
- select-projectSkill
- setup-repoSkill
- shipSkill
- skillsSkill
- source-architecture-from-codeSkill
- source-product-specs-from-codeSkill
- source-ux-design-from-codeSkill
- split-architectureSkill
- split-specsSkill
- staged-rolloutSkill
- statuslineSkill
- swarm-debugSkill
- swarm-design-architectureSkill
- task-validation-loopSkill
- test-driven-developmentSkill
- understanding-feature-requestsSkill
- use-git-worktreeSkill
- using-groundworkSkill
- ux-designSkill
- validateSkill
- vertical-sliceSkill
- work-on-next-taskSkill
- work-onSkill
The file
Files
Instrument Observability
Overview
Observability is added with the code that needs it, not bolted on after an outage. Shift Left: the cheapest time to make a change observable is while you still hold its context — what can fail, what "normal" looks like, which boundary the latency lives behind.
Core principle: A change you cannot observe in production is a change you cannot operate. Logs, metrics, traces, and alerts are part of "done," not a follow-up ticket.
When to Use
- Adding or changing a service boundary, request handler, job, or external call
- Code paths that can fail partially, retry, time out, or degrade
- Any change whose health you would want to confirm during a [[staged-rollout]]
Skip only for changes with no runtime behavior (docs, pure refactors with identical I/O, config-only edits).
Process
Apply each layer to the change.
- Structured logging. Emit machine-parseable events (key-value / JSON), not interpolated prose. Attach the correlation/trace id and the dimensions you'd filter on (tenant, route, outcome). Log decisions and failures, not control flow.
- RED metrics. For every request-serving surface, instrument the three:
- Rate — requests per second handled
- Errors — failed requests per second (and the error class)
- Duration — latency distribution (histogram, so you get p50/p95/p99 — never a single mean)
- Trace spans. Wrap each external boundary (DB query, RPC, queue, third-party API) in a span that propagates context. Spans turn "the request was slow" into "the request was slow here."
- Symptom-based alerts. Alert on user-visible symptoms (error rate breached, latency SLO burning), not on causes (CPU high, pod restarted). Causes generate noise; symptoms generate pages worth waking for. Each alert names the symptom and points at the dashboard/runbook.
Rationalizations
| Excuse | Reality |
| "I'll add metrics once it's in prod" | The first incident is the worst time to discover you're blind. Shift Left. |
| "The mean latency is fine" | A mean hides the p99 tail where users actually hurt. Use a histogram. |
| "There are already logs" | Unstructured logs you can't query are not observability. Structure them. |
| "I'll alert on CPU and disk" | Cause-based alerts page you for non-problems and miss real ones. Alert on symptoms. |
| "Tracing is a separate project" | One span around each boundary is minutes of work and the only thing that localizes latency. |
Red Flags
- Latency reported as a single average instead of a distribution
- Alerts wired to CPU, memory, or restart counts rather than user-visible symptoms
log.info("processing " + thing)style string interpolation instead of structured fields- An external call (DB, API, queue) with no span around it
- "We'll add observability after launch" in the plan
Verification
Cite concrete evidence — names and locations, not intentions:
- Structured log events added at decision/failure points, carrying the correlation id (name the events)
- Rate, Error, and Duration metrics emitted for each request surface; Duration is a histogram (name the metrics)
- A trace span wraps every external boundary the change touches (name the spans)
- At least one symptom-based alert defined against an SLO, pointing at a dashboard/runbook (name the alert)
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
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.

