logging-standards

Design structured wide-event logging with canonical log lines and PII-safe redaction.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/schalappe/skills --skill logging-standards-schalappe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-standards
Source: https://github.com/schalappe/skills/tree/main/logging-standards
Command: npx skills add https://github.com/schalappe/skills --skill logging-standards-schalappe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill turns messy, scattered debug-style logging into consistent, production-ready structured logs that you can reliably query during incidents.

Core Features & Use Cases

  • Wide, one-event-per-request logging: emits a single rich canonical log line at request completion instead of many fragmented info() calls.
  • Production-ready schema design: defines essential field buckets for correlation, user context, HTTP metadata, performance metrics, business values, and errors.
  • Noise and risk controls: applies tail sampling decisions at the end of the request and prevents sensitive data leakage via redaction and hashing guidance.
  • Query-driven field modeling: ensures the log schema supports real SQL-style investigation questions, with clear guidance when fields are missing.

Quick Start

Use logging-standards whenever you’re asked to “add some logging” or “I need better logs,” so you can produce queryable structured events for production observability.

Frequently Asked Questions about logging-standards

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

FAQPage Schema
How do I design structured logs for production debugging?

Design structured logs for production debugging by emitting a single wide canonical log line per request instead of fragmented info calls. This creates queryable production analytics with consistent essential fields for fast incident investigation.

What is a canonical log line and when do I need it?

A canonical log line is a single rich event emitted at request completion containing all correlation, HTTP, and business context. You need it when replacing scattered debug strings with queryable production observability for incident response.

How do I prevent PII redaction failures in structured logging?

Prevent PII redaction failures in structured logging by applying field-level hashing and redaction rules during schema design. This ensures sensitive data leakage is blocked before events are emitted to production analytics platforms.

What's the best way to handle tail sampling for request lifecycle logs?

Handle tail sampling for request lifecycle logs by deferring the sampling decision until request end. This captures complete request context and error states before dropping events, ensuring high-value production debugging data is retained.

How do I model log schema fields for SQL-style investigation?

Model log schema fields for SQL-style investigation by organizing them into essential buckets: correlation IDs, user context, HTTP metadata, performance metrics, business values, and errors. This query-driven approach answers real production debugging questions.

Why does request correlation fail with scattered debug logging?

Request correlation fails with scattered debug logging because fragmented info calls lack consistent high-cardinality identifiers and shared context. Implementing a single wide event per request enables reliable correlation across distributed production systems.