logging-sucks

Design and enforce structured, context-rich logs for distributed applications.

190|14|Updated May 20, 2014
One-click install
npx skills add https://github.com/elithrar/dotfiles --skill logging-sucks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: logging-sucks
Source: https://github.com/elithrar/dotfiles/tree/main/.config/opencode/skill/logging-sucks
Command: npx skills add https://github.com/elithrar/dotfiles --skill logging-sucks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps engineering teams design, implement, and maintain structured, context-rich logs to improve observability, incident response, and debugging efficiency.

Core Features & Use Cases

  • Wide Event Logging: Promote comprehensive, single-event logging per request with rich context.
  • Structured Logs: Enforce key-value formats and machine-parseable fields for reliable querying.
  • Context Propagation: Propagate trace_id/request_id and related metadata across service boundaries for end-to-end tracing.
  • Logging Governance: Provide guidelines to avoid sensitive data leakage and support compliance requirements.
  • Use Case: In a distributed system, applying these practices makes it easier to diagnose failures by correlating logs across services.

Quick Start

Apply the logging-sucks guidelines to implement structured logging and context propagation across your codebase.

Frequently Asked Questions about logging-sucks

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

FAQPage Schema
How do I implement structured logging in a distributed system?

Structured logging formats logs as key-value pairs with consistent fields like timestamp, level, event, trace_id, and service name, enabling reliable querying across microservices. Propagate trace_id across service boundaries to correlate logs during incident response and debugging.

What fields should I include in structured logs?

Essential fields include timestamp, log level, event description, request_id or trace_id, service name, environment, and high-cardinality identifiers. Exclude sensitive data like passwords, tokens, or PII to maintain compliance and security.

Why is context propagation important for observability?

Context propagation passes trace_id and request metadata across service boundaries, allowing you to follow a single request through your entire distributed system and correlate related logs for faster diagnosis of failures.

Can I use structured logging for incident response and postmortems?

Yes, structured logs with consistent fields and trace correlation enable rapid root-cause analysis during incidents and provide the audit trail needed for postmortem reviews and compliance documentation.

What's the best way to enforce logging standards across teams?

Establish governance guidelines that define required fields, trace_id propagation patterns, and prohibited data types; apply these rules during development and testing to catch violations early and maintain consistent observability.