observability-and-instrumentation

Instruments production code with structured logging, metrics, tracing, and alerting.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/sasidhar4444/ai-receptionist --skill observability-and-instrumentation-sasidhar4444
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/sasidhar4444/ai-receptionist/tree/main/agent-skills/skills/observability-and-instrumentation
Command: npx skills add https://github.com/sasidhar4444/ai-receptionist --skill observability-and-instrumentation-sasidhar4444

SYSTEM DOCUMENTATION & REQUIREMENTS

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 from the outside. ## Core Features & Use Cases - Structured Logging: Emits JSON log events with stable event names, correlation IDs, entry-point attribution, and consistent log levels while keeping secrets and PII out of logs. - Metrics and Tracing: Applies RED/USE metrics with bounded label cardinality and histogram percentiles, plus OpenTelemetry distributed tracing with context propagation across services. - Symptom-Based Alerting: Defines actionable alerts tied to user-facing symptoms with runbook links, thresholds, and two severity tiers, then verifies telemetry by triggering real failures. - 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, a latency histogram for the provider, a trace span around the charge call, and an alert on elevated error rate. ## Quick Start Use the observability-and-instrumentation skill to add structured logging, RED metrics, tracing, and an alert 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 emits each event as a JSON object with a stable event name and machine-readable fields instead of string interpolation. Attach a correlation ID generated at the system boundary to every log line, and use consistent levels: error, warn, info, and debug.

What metrics should I track for an HTTP endpoint?▼

Track RED metrics on every endpoint and external dependency: rate, errors, and duration as a latency histogram. Keep label cardinality bounded to 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 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% for five minutes, regardless of the underlying cause. Cause-based alerts like high CPU 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 a debugging skill, and observability is what makes future debugging fast. It also does not cover performance profiling of measured slowness or launch-day rollback checklists.