nestjs-wide-events

Installation
SKILL.md

NestJS Wide Events Logging

Emit ONE context-rich structured JSON event per request per service, instead of scattering dozens of log lines across the codebase.

Core Principles

  1. One event per request per service. Build context throughout the lifecycle; emit once at the end.
  2. Business context is mandatory. Include subscription tier, account age, feature flags, cart value -- anything needed at 2am during an incident.
  3. High cardinality is the point. Fields like user_id, request_id, order_id with millions of unique values make debugging possible.
  4. High dimensionality wins. 50 fields on one event beats 5 fields across 10 events.
  5. Structured JSON only. Every field is a queryable key-value pair.
  6. Tail sampling controls cost. Always keep errors, slow requests, VIP users. Sample the rest.
  7. No log-level abuse. The wide event IS the log. Level indicates outcome severity only.

Architecture Overview

Components

Related skills

More from cmglezpdev/custom-skills

Installs
9
First Seen
Mar 5, 2026