Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
ncklrs avatar

Logging Best Practices

  • 121 installs
  • 37 repo stars
  • Updated February 26, 2026
  • ncklrs/startup-os-skills

Apply wide-event structured logging, sampling, and anti-pattern rules so production logs stay debuggable without drowning in noise.

About

logging-best-practices packages Boris Tane’s “Logging Sucks” philosophy into an agent skill with focused markdown rules for solo builders running real services. Instead of sprinkling printf-style lines, it pushes one rich wide event per request lifecycle, structured fields with intentional cardinality, and business context that survives triage at 3 a.m. Sampling guidance insists on tail sampling after completion so errors and slow paths stay visible while routine traffic can be throttled. Anti-pattern docs call out scattered statements and reliance on raw string grep—failure modes that explode cost and shrink signal. The skill is reference-shaped: agents pull the right rule file (architecture, fields, sampling, anti-patterns) when designing new services or reviewing existing logging. It suits indie SaaS and API authors who want OpenTelemetry-friendly habits without hiring an observability team first. Journey-wide placement reflects that logging contracts should be chosen during backend build and enforced through ship and operate, not bolted on after launch.

  • Wide event and canonical log line architecture patterns
  • Field guides for high-cardinality, required context, and business context
  • Tail sampling after request completion plus always-keep exceptions
  • Anti-patterns for scattered logs and string-search-only debugging
  • Organized rule sections: Architecture, Field Design, Sampling, Anti-Patterns

Logging Best Practices by the numbers

  • 121 all-time installs (skills.sh)
  • +2 installs in the week ending Jul 26, 2026 (Skillselion tracking)
  • Ranked #511 of 1,438 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: CRITICAL risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/ncklrs/startup-os-skills --skill logging-best-practices

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs121
repo stars37
Security audit2 / 3 scanners passed
Last updatedFebruary 26, 2026
Repositoryncklrs/startup-os-skills

What it does

Apply wide-event structured logging, sampling, and anti-pattern rules so production logs stay debuggable without drowning in noise.

Files

SKILL.mdMarkdownGitHub ↗

Logging Best Practices

Expert guidance for production-grade logging based on Boris Tane's loggingsucks.com philosophy.

Core Philosophy

Stop logging "what your code is doing." Start logging "what happened to this request."

Traditional logging is optimized for writing, not querying. Developers emit logs for immediate debugging convenience without considering how they'll be searched later. This creates massive signal-to-noise ratios at scale.

The Wide Events Architecture

Instead of scattered log statements throughout your code, build one comprehensive event per request per service:

// ❌ Traditional scattered logging
logger.info("Request started");
logger.info(`User ${userId} found`);
logger.info("Fetching cart");
logger.debug(`Cart has ${items.length} items`);
logger.info("Processing payment");
logger.error(`Payment failed: ${error.message}`);

// ✅ Wide event - build throughout request, emit once
const event = {
  request_id: req.id,
  timestamp: Date.now(),
  service: "checkout",
  version: "2.3.1",

  user: { id: userId, tier: "premium", account_age_days: 847 },
  cart: { id: cartId, item_count: 3, total_cents: 15999 },
  payment: { method: "card", provider: "stripe", latency_ms: 234 },

  outcome: "failure",
  error: { type: "PaymentDeclined", code: "card_declined", retriable: true }
};

logger.info(event);

Key Concepts

ConceptDefinition
Wide EventOne comprehensive, context-rich log per request per service
CardinalityNumber of unique values (user IDs = high, HTTP methods = low)
DimensionalityCount of fields per event (aim for 40+ meaningful fields)
Tail SamplingSample decisions after request completion based on outcomes

When to Apply This Skill

  • Implementing logging in new services
  • Reviewing code with log statements
  • Debugging production issues
  • Designing observability strategy
  • Migrating from printf-style to structured logging
  • Reducing log volume while improving queryability

What This Skill Provides

1. Wide event patterns for different frameworks and languages 2. Field design guidance for high-cardinality debugging 3. Sampling strategies that preserve signal 4. Anti-pattern detection in existing logging code 5. Query-first thinking for log architecture

Related skills

FAQ

Is Logging Best Practices safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDmonitoringinfra

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.