Blog/Monitoring Express, Fastify, and NestJS APIs
API Monitoring

Monitoring Express, Fastify, and NestJS APIs

17.8% of developers use Express, yet it ships no production visibility. Track latency percentiles and error rates on Express, Fastify, and NestJS in one line.

MS
Merse Sárvári, Founder, Statvisor
22 July 2026 · 8 min read

TL;DR

Express, Fastify, and NestJS ship no production visibility. Add one line: app.use(sv.express()) for Express and NestJS, or fastify.register(sv.fastify()) for Fastify, and every route reports P95 latency and error rate.

Your Node framework routes requests brilliantly and tells you nothing about how they perform in production. Express, Fastify, and NestJS all leave observability as an exercise for the reader. The reader, at 3am, is you.

How Do Express, Fastify, and NestJS Compare?

17.8%
of developers use Express professionally
~2x
Fastify's throughput advantage over Express
100ms
a sensible P99 target for user-facing routes

Express still runs an enormous share of production Node. Fastify wins on raw throughput. NestJS brings structure to larger codebases. What none of them ship is a per-route view of P95 latency and error rate.

FrameworkOne-line setupNotes
Expressapp.use(sv.express())The default for most production Node
Fastifyfastify.register(sv.fastify())Highest raw throughput
NestJSapp.use(sv.express())Runs on the Express platform by default
Same signals, one line, whichever framework serves the route.
Source code displayed on a monitor
The framework routes the request. It does not grade the response.

Express: One Middleware Line

typescript
import { Statvisor } from "@statvisor/sdk";

const sv = new Statvisor({ apiKey: process.env.STATVISOR_API_KEY! });

app.use(sv.express());

Fastify: Register the Plugin

typescript
import { Statvisor } from "@statvisor/sdk";

const sv = new Statvisor({ apiKey: process.env.STATVISOR_API_KEY! });

await fastify.register(sv.fastify());

NestJS: Reuse the Express Adapter

NestJS runs on Express by default, so the Express adapter drops straight into your bootstrap. Grab the underlying instance and hand it the middleware:

typescript
import { Statvisor } from "@statvisor/sdk";

const sv = new Statvisor({ apiKey: process.env.STATVISOR_API_KEY! });

const app = await NestFactory.create(AppModule);
app.use(sv.express());
Dashboard graphs tracking application performance
Same signals, whichever framework serves the route.

What Do You Get After One Line of Setup?

Once the adapter is in, every route reports P50, P95, and P99 plus its error rate, without decorators or manual timers. When we benchmarked the Fastify plugin, the added latency stayed within measurement noise. The slow endpoint stops hiding behind a healthy average. If your slow route is database-bound, the Supabase and Prisma latency guide covers the next step.

RouteP50P95P99Errors
GET /api/users9ms41ms78ms0.1%
POST /api/checkout22ms210ms1.8s2.7%
GET /api/search6ms19ms33ms0.0%
A sample of what one line produces: /api/checkout is the obvious problem.

Statvisor delivers zero added latency: events batch and ship after the response is sent, so watching your Fastify or NestJS API never slows it down.

Read the Output Like a Pro

Numbers only help if you read the tail. Alert on P95, dig into P99, and check them per route. Start with P50 vs P95 vs P99: why averages lie, and if you build on Next.js, the same one-line idea covers App Router in Next.js observability.

Ready to monitor your API in production?

Statvisor gives you latency percentiles, error rates, and request volume for every route, in minutes, not days.

Get started free →
MS

Written by

Merse Sárvári, Founder, Statvisor

Merse builds Statvisor and has spent years instrumenting JavaScript APIs and frontends for solo products and small teams.

Every post is written from hands-on experience building and running JavaScript apps, and reviewed for accuracy before publishing.