nestjs-wide-events
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
- One event per request per service. Build context throughout the lifecycle; emit once at the end.
- Business context is mandatory. Include subscription tier, account age, feature flags, cart value -- anything needed at 2am during an incident.
- High cardinality is the point. Fields like
user_id,request_id,order_idwith millions of unique values make debugging possible. - High dimensionality wins. 50 fields on one event beats 5 fields across 10 events.
- Structured JSON only. Every field is a queryable key-value pair.
- Tail sampling controls cost. Always keep errors, slow requests, VIP users. Sample the rest.
- No log-level abuse. The wide event IS the log. Level indicates outcome severity only.
Architecture Overview
Components
More from cmglezpdev/custom-skills
code-audit
>
9nestjs-lgtm-metrics
Add application-level Prometheus metrics to a NestJS app using the OpenTelemetry SDK and an OTel Collector. Covers HTTP RED metrics, Node.js runtime metrics, business metrics, and advanced observability patterns. Use this skill whenever the user wants to add metrics, dashboards, or monitoring to a NestJS application, mentions Prometheus, Grafana metrics, OpenTelemetry metrics, OTel Collector, or asks about SLIs/SLOs, or application-level monitoring in a NestJS context. Also trigger when the user wants custom counters, histograms, gauges, or summaries in NestJS. This skill focuses exclusively on metrics the APPLICATION must emit. It does not cover logging, tracing, infra-level metrics from cAdvisor, node-exporter, postgres-exporter, or redis-exporter.
8documentation
>
7daramex-testing
>
1daramex-monorepo-docs
>
1nestjs-app-metrics
Add application-level Prometheus metrics to a NestJS app using the OpenTelemetry SDK and an OTel Collector. Covers HTTP RED metrics, Node.js runtime metrics, business metrics, and advanced observability patterns. Use this skill whenever the user wants to add metrics, dashboards, or monitoring to a NestJS application, mentions Prometheus, Grafana metrics, OpenTelemetry metrics, OTel Collector, or asks about SLIs/SLOs, or application-level monitoring in a NestJS context. Also trigger when the user wants custom counters, histograms, gauges, or summaries in NestJS. This skill focuses exclusively on metrics the APPLICATION must emit. It does not cover logging, tracing, infra-level metrics from cAdvisor, node-exporter, postgres-exporter, or redis-exporter.
1