Observability Handbook

0•

Implements structured logging, request correlation IDs, and PII-safe error reporting for Next.js App Router applications.

The Observability Handbook skill equips Claude with architectural patterns and implementation standards for production telemetry across Next.js App Router applications. It guides the generation and propagation of request correlation IDs across middleware, Route Handlers, and Server Actions while enforcing strict PII boundaries to keep sensitive credentials, tokens, and personal data out of logs. By standardizing structured JSON line logging, client-side error sanitization, and vendor-neutral OpenTelemetry instrumentation, this skill ensures robust system visibility and straightforward incident diagnosis without locking your project into specific APM providers.

主要功能

01Configures client-side error boundaries with sanitized stack traces and deduplicated error reporting
02Differentiates Edge versus Node runtime logging constraints and prevents double-logging across middleware and layouts
03Establishes structured JSON logging contracts without exposing PII, tokens, or secret query strings
04Provides vendor-agnostic OpenTelemetry trace context propagation patterns for server runtime
05Generates and propagates correlation IDs (x-request-id) across middleware, Route Handlers, and Server Actions
060 GitHub stars

使用场景

01Auditing existing logging pipelines to enforce PII redaction and strip sensitive authorization tokens
02Setting up vendor-neutral structured logging and request tracing in a new Next.js App Router project
03Integrating clean error boundary reporting in error.tsx paired with server-side instrumentation hooks