observability-and-instrumentation

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

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/MSC72m/DevForge --skill observability-and-instrumentation-msc72m
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/MSC72m/DevForge/tree/main/skills/observability-and-instrumentation
Command: npx skills add https://github.com/MSC72m/DevForge --skill observability-and-instrumentation-msc72m

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @opentelemetry/sdk-node, @opentelemetry/auto-instrumentations-node, prom-client.

What problem does it solve? Production features often ship without telemetry, so when incidents occur engineers cannot tell what happened from the available data. This Skill guides you to instrument code alongside the feature so production behavior is visible and diagnosable. ## Core Features & Use Cases - Structured Logging: Emits JSON log events with stable event names, correlation IDs, and entry-point fields instead of unqueryable string interpolation. - Metrics and Tracing: Applies RED/USE metric patterns with bounded label cardinality and OpenTelemetry distributed tracing across services. - Symptom-Based Alerting: Creates actionable alerts tied to user-facing symptoms, each linked to a minimal runbook. - Use Case: When adding a payment retry flow, use this Skill to define the on-call questions first, then add structured payment_failed log events, latency histograms for the provider, and an error-rate alert with a runbook before shipping. ## Quick Start Use the observability-and-instrumentation skill to add logging, metrics, tracing, and alerting to my new checkout endpoint before it ships.

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?▼

Structured logging emits JSON objects with stable event names and machine-readable fields instead of interpolated strings. 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?▼

Track RED metrics on every endpoint and external dependency: Rate, Errors, and Duration as a latency histogram. Use labels from small fixed sets like route template and status class, and read p50/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 for HTTP, gRPC, and common DB clients. Prometheus prom-client is one common metrics backend; the RED/USE and cardinality rules apply identically either way.

Why do metric labels with user IDs cause problems?▼

Every unique label combination creates a separate time series, so unbounded values like user IDs, raw URLs, or error messages explode cardinality and overload the metrics backend. High-cardinality lookups belong in logs and traces instead.

When should I not use this observability skill?▼

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