observability-and-instrumentation

Instruments production code with structured logs, metrics, traces, and symptom-based alerts.

Updated Jun 23, 2026
One-click install
npx skills add https://github.com/jampissarandev/Expense-Tracker --skill observability-and-instrumentation-jampissarandev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/jampissarandev/Expense-Tracker/tree/main/.github/skills/observability-and-instrumentation
Command: npx skills add https://github.com/jampissarandev/Expense-Tracker --skill observability-and-instrumentation-jampissarandev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Production features often ship without telemetry, so when something breaks, engineers cannot tell what happened from the available data. This Skill guides you to instrument code alongside the feature so incidents become queries instead of archaeology. ## Core Features & Use Cases - Question-driven instrumentation: Define the on-call questions first, then map structured logs, RED/USE metrics, and OpenTelemetry traces to each question. - Structured logging with correlation IDs: Emit JSON log events with stable names, consistent levels, and request IDs propagated across services, while never logging secrets or PII. - Symptom-based alerting: Create actionable alerts on user-facing symptoms with runbook links, and verify telemetry by triggering failures in staging. - Use Case: When adding a payment retry flow, use this Skill to add a payment_failed structured log event, a latency histogram for the provider call, a trace span around the charge operation, and an alert on elevated failure rate. ## Quick Start Use the observability-and-instrumentation skill to add logging, metrics, tracing, and alerts to my new checkout endpoint.

Frequently Asked Questions about observability-and-instrumentation

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

FAQPage Schema
How do I add structured logging to a production service?

Structured logging means emitting JSON log events with stable event names and machine-readable fields instead of interpolated strings. Attach a correlation or request ID at the system boundary and include it on every log line, and never log secrets, tokens, or full PII.

What metrics should I track for an HTTP endpoint?

Use the RED method: rate, errors, and duration as a latency histogram for every endpoint and external dependency. Keep label cardinality bounded to small fixed sets like route template and status class, and read p95/p99 percentiles rather than averages.

Should I use OpenTelemetry or Prometheus for instrumentation?

OpenTelemetry is the vendor-neutral standard for tracing and metrics, with auto-instrumentation covering HTTP, gRPC, and common database clients. Prometheus prom-client is one common metrics backend; the RED/USE and cardinality rules apply identically either way.

Why should alerts be symptom-based instead of cause-based?

Symptom-based alerts fire exactly when users are hurt, such as error rate above 1% or p99 latency above 2 seconds, regardless of cause. Cause-based alerts like CPU at 85% fire when nothing is wrong and miss failures you did not predict.

When should I not use this observability skill?

Do not use it to diagnose a failure happening right now; that belongs to debugging and error recovery workflows. It also does not cover profiling measured slowness or launch-day monitoring checklists, which are separate concerns.