observability-and-instrumentation

Implements structured logging, metrics, tracing, and alerting for production code.

Updated May 13, 2026
One-click install
npx skills add https://github.com/sapatamuku-creator/mastersapatamuku --skill observability-and-instrumentation-sapatamuku-creator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/sapatamuku-creator/mastersapatamuku/tree/main/releases/v2.7/.agents/skills/observability-and-instrumentation
Command: npx skills add https://github.com/sapatamuku-creator/mastersapatamuku --skill observability-and-instrumentation-sapatamuku-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Production features often ship without telemetry, making incidents impossible to diagnose from available data. This Skill guides you to instrument code alongside development so on-call engineers can answer what the system is doing and why. ## Core Features & Use Cases - Structured Logging: Emits JSON log events with stable event names, consistent log levels, and mandatory correlation/request IDs propagated across services. - Metrics and Tracing: Applies RED (Rate, Errors, Duration) and USE (Utilization, Saturation, Errors) methods with bounded label cardinality, plus OpenTelemetry distributed tracing with context propagation. - Symptom-Based Alerting: Creates actionable alerts tied to user-facing symptoms with runbook links, thresholds, and two severity tiers instead of noisy cause-based pages. - Use Case: When adding a payment retry flow, define the on-call questions first, then add a payment_failed structured log event, a latency histogram for the provider, and an alert on error rate exceeding 1% for 5 minutes. ## Quick Start Instrument my new checkout endpoint with structured logs, RED metrics, and an OpenTelemetry trace following the observability skill.

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 Node.js application?▼

Emit JSON log events with stable event names and machine-readable fields instead of string interpolation. Attach a correlation ID via a child logger per request, and use consistent levels: error for broken invariants, warn for handled degradation, info for business events.

What metrics should I track for an HTTP API?▼

Use the RED method: Rate (requests per second), Errors (failure rate), and Duration (latency histogram with p50/p95/p99 percentiles). Apply it to every endpoint and external dependency, keeping labels to bounded sets like route template and status class.

Should I use OpenTelemetry or Prometheus for instrumentation?▼

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

Why do high-cardinality metric labels cause problems?▼

Every unique label combination creates a separate time series, so labels like user IDs, raw URLs, or error messages explode storage and query costs. Keep labels to small fixed sets and put high-cardinality values in logs and traces instead.

When should an alert page someone versus create a ticket?▼

Page only for user-facing symptoms requiring immediate action, such as error rate above 1% for 5 minutes. Use ticket severity for degradation that can wait a week, and delete any alert whose response is to ignore it.

When is observability instrumentation not the right approach?▼

Do not use it to diagnose an active failure (use a debugging skill), profile measured slowness (use performance optimization), or build launch-day monitoring checklists. Instrumentation is written alongside the feature, before those situations arise.