Blog

Notes from the traffic layer

How teams debug production APIs, what full-fidelity capture makes possible, and what we are shipping.

ApiTraffic header: Express monitoring by route, not by URL, with a /metrics output panel listing route-labelled request counts for 200, 201, 404 and 500 responses
Monitoring

Express monitoring: route-level metrics, APM and alerts for Express 4 and 5

Most Express metrics are labelled by raw URL and miss async errors. Build route-level metrics with prom-client, add OpenTelemetry in the right load order, and set alerts, with code we ran on Express 4.22.3 and 5.3.0.

Jason Fill November 25, 2026 11 min read
Header: 'Node.js API monitoring: What to measure, how to set it up, and which tools fit a small team', with a metrics panel from the guide's example: /orders/:id p95 250ms and 2.0% 5xx, /report p95 250ms, unmatched 404, event loop delay p50 120.8ms against an idle 20.2ms.
Monitoring

Node.js API monitoring: what to measure, how to set it up, and which tools fit a small team

Uptime checks miss most of what breaks a Node API. What to measure per route and per process, a tested Express middleware for RED metrics and event loop delay, where OpenTelemetry fits, a fair tool comparison and the alerts worth paging on.

Jason Fill November 23, 2026 16 min read
ApiTraffic card: 'A model API key leaked. The first hour.' with a timeline: 00:00 revoke at the provider, 00:10 compare provider usage with your own log, 00:30 new key and deploy, 01:00 rotate every secret nearby. Source: Wiz Research, Oct 30 2026.
Security

A model API key leaked. The first hour, for a Node team

In October, stolen Amazon Bedrock credentials made about 2.5 million API calls before anyone stopped them. A first-hour runbook for a small Node team when a model provider key leaks: revoke, scope the damage from your own logs, then rotate the right way.

Jason Fill November 20, 2026 7 min read
Header: 'Your MCP server is an API. Debug it like one.' beside an illustrative log of MCP calls returning 200, 404 (session not found), 401 (token expired) and 499 (client gave up).
Debugging

Your MCP server is an API. Debug it like one.

A remote MCP server works on localhost, then fails in production with a vague "tool call failed." Lost sessions behind a load balancer, expiring OAuth tokens and proxies that cut streams off are all visible at the HTTP layer. Here's where to look.

Jason Fill November 19, 2026 8 min read
UV_THREADPOOL_SIZE in Node.js: terminal output where dns.lookup(localhost) takes 544 ms behind eight scrypt hashes with the default pool and 30 ms with UV_THREADPOOL_SIZE=16, measured on Node 22.23
Monitoring

UV_THREADPOOL_SIZE in Node.js: when DNS lookups, crypto and fs wait in the same line

Outbound calls slow down under load while CPU stays low? DNS lookups, crypto and fs share libuv's 4-thread pool in Node. How to reproduce the queue, measure it per upstream, and set UV_THREADPOOL_SIZE.

Jason Fill November 18, 2026 5 min read
Header: 'Log it. Measure it. Block it.' beside an illustrative NestJS request log: a 200 on /api/users/:id, a 403 from a guard, an unmatched 404, a 429 on login, a SQL injection attempt blocked by the WAF, and a slow report route at p95 1.8 s.
Coding

The NestJS production checklist: what to log, measure and block

NestJS adds guards, interceptors, pipes and request-scoped providers to every request, and each one shows up in your latency and your logs. A practical checklist for what to log, what to measure and what to block before you ship.

Jason Fill November 17, 2026 9 min read
Before and after: a Node.js login that answered 401 'Wrong password' or 404 'No account' with different timings now answers 401 'Invalid email or password' in about 33 ms for both real and unknown emails.
Security

Stop user enumeration on your Node.js login, signup and reset endpoints

AI agents made hundreds of millions of requests to login pages in the first half of 2026. If your API answers differently for real and unknown emails, it hands them a target list. Here's how to make login, reset and signup give one answer.

Jason Fill November 16, 2026 6 min read
ECONNRESET, ETIMEDOUT, ECONNREFUSED: headline 'Three error codes, three different parties that hung up' with each code, its syscall and meaning, and the note that a stale keep-alive socket is the usual ECONNRESET cause in an API.
Debugging

ECONNRESET, ETIMEDOUT, ECONNREFUSED: what each means in your Node logs

ECONNREFUSED, ETIMEDOUT and ECONNRESET look alike in a log and have different causes. What each one means, how to tell inbound from outbound, and the fixes: keep-alive timeouts, explicit timeouts, and retries only on idempotent calls.

Jason Fill November 15, 2026 4 min read
Lock down npm installs: headline 'Turn off install scripts before an agent runs npm install' with .npmrc ignore-scripts=true, npm rebuild and npm ci commands, and Safeguard's count for 26 to 28 Oct 2026: 96 malicious npm packages, 112 malware advisories.
Security

Lock down npm installs when an AI agent adds your dependencies

In late October, 96 malicious npm packages appeared in three days, several running code at install time. How to turn off install scripts in npm and pnpm, allow the few builds you need, and review every dependency an AI agent adds.

Jason Fill November 14, 2026 4 min read
Express error handling in production: an Express error middleware with a res.headersSent check next to two JSON log lines, a 500 error with requestId and route GET /orders/:id and a 409 warning (illustrative)
Debugging

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.

Jason Fill November 13, 2026 7 min read
Header: 'Your auth check passed. Now prove what the agent did.' beside an illustrative request log of one agent run, including a duplicate refund and a denied DELETE.
Security

Your auth check passed. Now prove what the agent did.

An agent calls your API with a valid token, the scopes allow it, and the write lands with a clean 201. Nobody asked for it. Here's how to fix authorization for agents first, then build an audit trail that shows exactly what the agent did.

Jason Fill November 12, 2026 7 min read
Bar chart: ALB idle timeout 60 s, old Node keepAliveTimeout 5 s causing a 502 when the ALB reuses a closed socket, and a fixed keepAliveTimeout of 65 s, with the code server.keepAliveTimeout = 65_000; server.headersTimeout = 66_000;
Monitoring

Node.js server timeouts: requestTimeout, headersTimeout and keepAliveTimeout

Random 502s behind a load balancer often come down to one setting: keepAliveTimeout. What each Node.js server timeout controls, safe values behind an AWS ALB, and how to confirm the fix.

Jason Fill November 11, 2026 5 min read