Posts tagged “Pino”
AdonisJS monitoring and logging: the built-in logger, request logs and APM
AdonisJS ships a Pino logger and health checks but logs no requests and sends raw error messages on a 500. How to add request logs by route, metrics, OpenTelemetry tracing and a safer exception handler, tested on AdonisJS 7.
hapi monitoring and logging: hapi-pino, request lifecycle events and APM
hapi 21 gives you a hook for every layer of monitoring. Set up hapi-pino with redaction, per-route Prometheus metrics, Boom error logging and OpenTelemetry traces, with code we ran and the output it printed.
Koa monitoring and logging: request logs, metrics and APM for Koa 2 and 3
A Koa timing middleware that only uses try/finally logs every crash as a 404. How to set up Koa logging with pino, per-route metrics with prom-client, error reporting and OpenTelemetry traces, tested on Koa 2 and 3.
Fastify logging: getting the most from the built-in pino logger
Fastify logs every request out of the box, but the default skips routes, user agents and bodies, and Fastify 4 trusts client request ids. A tested production config for Fastify 4 and 5.
NestJS logging: the built-in Logger, nestjs-pino and request logs that include rejected requests
Nest's built-in Logger prints no request logs, and logging interceptors never see a guard's 403 or an unmatched 404. This guide sets up nestjs-pino with request IDs, redaction and route patterns, tested on NestJS 11 and 12.
Express logging in production: pino-http vs morgan, request bodies and redaction
morgan, pino-http or winston? A production Express logging setup on Express 5: one JSON line per request with request ID, route and user, bodies for failed requests only, pino redaction, and errors on the same line.
Node.js API logging: what to log for every request, and how
Most Node.js API logs can't answer "what happened to this customer's request?" This guide covers the six fields every request line needs, safe body capture that keeps streaming intact, redaction, outbound calls, and the queries to run, with code tested on Node 22 and 24.
Observability for a 5-person Node team: what each option actually gives you
When a customer says the export failed again, how long until you see the exact request? For most small Node teams the answer is spread across three tools. Here's what each option is built for, the gaps that bite, and a setup you can copy.
Log every LLM API call your Node app makes
October's AI platform breaches leaked model provider keys, and one stolen key ran about 800,000 calls in 30 hours. How to log every LLM call from Node with tokens, customer and a key fingerprint, then reconcile against provider usage to catch calls your code didn't make.
Express error handling in production: async errors, error middleware and what to log
An async handler that rejects in Express 4 can crash the process or leave the request hanging. How errors reach your error middleware in Express 4 and 5, one error class for status codes, and what to log so on-call can find the request behind a 500.
Node.js log levels that mean something: a logging policy for small teams
At 3am your error log is full of scanner 404s and the real database timeout is buried. Here is a Node.js log levels policy a small team can paste into its repo, plus the code that enforces it.
How to redact sensitive data in logs for Node.js APIs
Found a bearer token in your logs? Here's how to keep secrets and personal data out of Node API logs in an afternoon: Pino redaction, URL and error scrubbing, body allowlists and a test that catches leaks.