observability-and-instrumentation

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

3|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/marcmarti9/agentit --skill observability-and-instrumentation-marcmarti9
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/marcmarti9/agentit/tree/main/skills/observability-and-instrumentation
Command: npx skills add https://github.com/marcmarti9/agentit --skill observability-and-instrumentation-marcmarti9

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Production features often ship without telemetry, leaving teams unable to answer what the system is doing or why when incidents occur. This Skill guides you to instrument code alongside the feature so failures become queries instead of archaeology. ## Core Features & Use Cases - Structured Logging: Emits JSON log events with stable event names, correlation IDs, and entry-point attribution across schedulers, endpoints, and CLI runs. - Metrics and Tracing: Applies RED/USE metrics with bounded label cardinality and OpenTelemetry distributed tracing with context propagation across services. - Symptom-Based Alerting: Creates actionable alerts tied to user-facing symptoms, each linked to a minimal runbook, and verifies telemetry by inducing failures in staging. - 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 error-rate alert with a runbook before shipping. ## Quick Start Use the observability-and-instrumentation skill to add logging, metrics, tracing, and an alert with a runbook to the 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 Node.js service?▼

Structured logging emits JSON objects with a stable event name and machine-readable fields instead of interpolated strings. Attach a child logger per request carrying a correlation ID, and never log secrets, tokens, or full request bodies.

What metrics should I instrument for an HTTP API?▼

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

Does OpenTelemetry work with existing Node.js applications?▼

OpenTelemetry auto-instrumentation covers HTTP, gRPC, and common database clients with near-zero code when the SDK is imported before anything else. Add manual spans only around meaningful internal units of work and propagate context across async boundaries.

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

Symptom-based alerts fire exactly when users are hurt, regardless of cause, while cause-based alerts like CPU thresholds fire when nothing is wrong and miss unpredicted failures. Every alert must be actionable, link to a runbook, and use only page and ticket severities.

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 performance profiling of measured slowness or launch-day monitoring checklists, which are separate concerns.