observability-patterns

Implements structured logging, metrics, alerting, and correlation ID patterns for services.

1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/dominionism/Noesis --skill observability-patterns-dominionism
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability-patterns
Source: https://github.com/dominionism/Noesis/tree/main/assets/skills/observability-patterns
Command: npx skills add https://github.com/dominionism/Noesis --skill observability-patterns-dominionism

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Applications often ship with unstructured printf-style logs, missing correlation IDs, leaked secrets in log output, and alerts that fire without runbooks, making incidents slow to diagnose and resolve. ## Core Features & Use Cases - Structured Logging Standards: Enforces JSON log entries with required fields (timestamp, level, service, request_id) and snake_case event naming. - Sensitive Data Protection: Provides an allowlist approach, masking patterns, and a catalog of field names (passwords, tokens, card numbers) that must never appear in logs. - Metrics and Alert Design: Defines RED metrics, naming conventions with units and labels, and an alert template requiring duration filters, owners, and runbooks. - Use Case: When adding logging to a new TypeScript service, apply the log level decision tree, correlation ID middleware, and metric naming rules so the service is debuggable within minutes of an incident. ## Quick Start Review my service's logging and monitoring setup and apply structured logging, correlation IDs, and alert design patterns.

Frequently Asked Questions about observability-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement structured logging in TypeScript?▼

Structured logging emits each entry as a JSON object with required fields: timestamp, level, message, service, and request_id. Use snake_case event names like user_login and explicitly select fields to log rather than interpolating strings.

What log level should I use for different events?▼

Use ERROR only for unrecoverable failures requiring human action, WARN for degraded conditions, INFO for significant business events, and DEBUG for troubleshooting detail. Validation failures and 404s are DEBUG, not ERROR.

How do I prevent sensitive data from appearing in logs?▼

Use an allowlist approach: explicitly select non-sensitive fields instead of dumping request bodies. Mask identifiers when needed, such as logging only a key prefix or card last four digits, and never log passwords, tokens, or card numbers.

How do correlation IDs work across microservices?▼

Generate or accept an X-Request-ID header at the entry point, store it in async local storage, and include it in every log entry. Propagate the same ID in headers to downstream services and into background job payloads.

Why should metric labels avoid high-cardinality values?▼

Labels like user_id or request_id create millions of distinct time series, overwhelming the metrics backend. Use labels only for bounded sets such as status codes, endpoints, and service names.

What makes a good production alert?▼

Every alert needs a duration filter (for example 5 minutes) to avoid firing on spikes, a severity, an owner, and a runbook with concrete investigation steps. More than two or three actionable alerts per week per service indicates wrong thresholds.