observability-and-instrumentation

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

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/DagimAlemayehuu/AgenticEngineering --skill observability-and-instrumentation-dagimalemayehuu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-and-instrumentation
Source: https://github.com/DagimAlemayehuu/AgenticEngineering/tree/main/agentic-engineering/core/dependencies/delivery/observability-and-instrumentation
Command: npx skills add https://github.com/DagimAlemayehuu/AgenticEngineering --skill observability-and-instrumentation-dagimalemayehuu

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 production behavior is visible and diagnosable from day one. ## Core Features & Use Cases - Structured Logging: Emit JSON log events with stable event names, consistent log levels, and mandatory correlation/request IDs, while keeping secrets and PII out of logs. - Metrics and Tracing: Apply RED (Rate, Errors, Duration) and USE (Utilization, Saturation, Errors) methods with bounded label cardinality, histogram-based percentiles, and OpenTelemetry distributed tracing. - Symptom-Based Alerting: Create actionable alerts tied to user-facing symptoms with runbook links, justified thresholds, and two severity tiers, then verify 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, a trace span around the charge call, and an alert on error rate above 1%. ## Quick Start Use the observability-and-instrumentation skill to add structured logging, RED 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 (requests per second), Errors (failure rate), and Duration (latency histogram). For resources like queues and pools, use USE: Utilization, Saturation, Errors. Track percentiles like p95 and p99 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 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. Labels must come from small fixed sets such as route templates, status classes, and provider names; unbounded values belong in logs and traces.

When should I alert on symptoms instead of causes?▼

Alert on symptoms users feel, such as error rate above 1% or p99 latency above 2 seconds, because they fire exactly when users are hurt regardless of cause. Cause-based alerts like CPU at 85% fire when nothing is wrong and miss unpredicted failures.

When is this observability skill not the right tool?▼

It is not for diagnosing an active failure, which belongs to debugging and error recovery, nor for profiling measured slowness, which belongs to performance optimization. It covers writing instrumentation alongside features, not launch-day monitoring checklists.