Node API monitoring

Node API monitoring, from one npm install.

Every request your Node.js API serves, recorded with its payload, timing and queries, grouped by endpoint and watched for errors, slowdowns and breaking changes. Turn on host telemetry and you get the event loop, memory and CPU of every server running it too.

Definition

What is Node API monitoring?

Node API monitoring is recording the requests a Node.js API serves (which endpoint was called, by whom, with what payload, how long it took and what came back) and watching that traffic for errors, slow endpoints, breaking changes and abuse, alongside the health of the Node processes serving it.

Node API monitoring

The requests: which endpoints are slow, which are failing, who is calling them and what changed in the responses. This is what your customers feel.

Node monitoring

The process: CPU, memory, event-loop delay and garbage collection. This is why a request was slow when nothing in its own code explains it.

What to watch

Six things to monitor in a Node.js API

Uptime checks say the API answered. These say whether it is working for the people calling it, and why not when it isn't.

Latency per endpoint

p50, p95 and p99 for each route, so GET /orders/{id} is one line on the chart. An average across the whole service hides the slow endpoint your biggest customer uses.

Errors with the request attached

Every 5xx kept with the payload that caused it, and client errors spread across many consumers flagged as your problem rather than one caller sending bad requests.

Queries and N+1s

Each database query, cache call and outbound request a route made, timed. N+1 patterns surface as "43 calls / request" instead of a vague slowdown.

Event loop and memory

Event-loop delay, heap, CPU and garbage collection from every Node process, so a slow request can be traced to the server that served it.

Breaking response changes

A field removed or retyped in a response breaks clients before any error rate moves. Drift detection compares each endpoint with its own history.

Regressions after a deploy

Release markers on every chart, and a list of which endpoints and queries got slower after each deploy, ranked by their impact on real traffic.

Set up

Monitor a Node.js API in three lines

One package, mounted where your framework expects middleware, before your routes. What runs is decided in your ApiTraffic account and pushed to every server, so turning a feature on is a dashboard change, not a deploy.

$ npm i @apitraffic/node
const express = require('express');
const apitraffic = require('@apitraffic/node');

const app = express();

app.use(express.json());          // parse first - verdicts read parsed bodies
app.use(apitraffic.express({
  token: process.env.API_TRAFFIC_TOKEN,
  bucket: process.env.API_TRAFFIC_BUCKET,
}));

app.get('/users/:id', (req, res) => {
  res.json({ id: req.params.id });
});

app.listen(3000);
Order is the whole integration. After express.json(), before your routes.

Node 20+. Types included, no @types package. Read the middleware source →

Everything about Express →

Node API monitoring

One record per request, queries included

Each request is one record: the payload in and out, every query, cache call and outbound request it caused, and how long each took. Requests group by endpoint automatically, so percentiles and error rates line up per route without annotating anything.

  • Search by endpoint, status, duration, header, tag or a field in the body
  • Postgres, MySQL, MongoDB, Redis, fetch, axios and more, timed per request
  • Incidents per endpoint, routed to Slack, email, PagerDuty, Jira or a webhook
See performance monitoring →
Node monitoring

The process behind the requests

Turn on host telemetry for a bucket and every Node.js server running the SDK reports its own CPU, memory, event-loop delay and garbage collection. The Servers page lists each process with its health, its share of the traffic and its restarts, lined up with the requests it served.

  • Healthy, busy or degraded at a glance, from loop delay, heap and CPU
  • See whether a slow period follows event-loop or memory pressure
  • No agent to install, and no restart to turn it on or off
See server health →
Built for Node

Monitoring that stays off your request path

A Node.js process has one event loop. Anything that monitors it has to leave that loop alone.

  • Records in-process and returns immediately; payloads ship in batches off the event loop
  • Fails open: if ApiTraffic is unreachable, your API carries on
  • Credential headers and secret-looking keys masked before anything is sent
  • Node 20+, TypeScript declarations included, no @types package
  • An in-app firewall that reads the same requests it records

Node API monitoring for your framework

Not on Node? API traffic monitoring works for any stack through a proxy URL.

FAQ

Node API monitoring questions

Know what your API did - before your customers tell you.

One npm install and one line of code. Your first requests arrive in minutes, with their queries, their firewall verdict and a baseline for every endpoint already building.

Free trial · No credit card · Set up in minutes