What is Statvisor?
Statvisor is a backend API monitoring platform. Install a lightweight SDK into your existing backend, and every HTTP route is automatically instrumented β you get real-time latency percentiles, error rates, request volume, and status code distributions without writing any custom telemetry code.
One-line setup
One middleware call instruments every route automatically.
Real-time analytics
P50/P95/P99 latency, error rates, and volume charts.
Privacy-first
No request/response bodies. No end-user IP addresses.
Up and running in 2 minutes
The flow is the same regardless of framework: create a project, grab your API key, install the SDK, add one line. Here's the generic version:
Create a project in the dashboard
https://api.example.com). This is the origin where your API is hosted β scheme and host only, no path.Copy your API key
vl_. Store it securely (e.g. in an environment variable).Install the SDK
npm install @statvisor/sdkAdd the middleware
Verify it's working
Under the hood
The SDK wraps your framework's request lifecycle using standard middleware hooks. It records the wall-clock time before your handler runs and after it completes, capturing:
- Route path (normalised β e.g. /users/:id, not /users/123)
- HTTP method (GET, POST, PUT, PATCH, DELETEβ¦)
- Response status code
- Duration in milliseconds
- Timestamp (UTC)
Events are queued in memory and flushed to https://statvisor.com/api/ingest asynchronously in the background. Your request handlers are never blocked.
Statvisor never captures request bodies, response bodies, query parameters, headers, or any end-user PII. Only the metadata listed above is sent.
Express.js Integration
Works with Express 4 and 5. Register the middleware before your routes so every request is captured.
Install the SDK
npm install @statvisor/sdkAdd the middleware
import express from "express";
import { express as statvisor } from "@statvisor/sdk";
const app = express();
// Add Statvisor BEFORE your routes
app.use(statvisor({ apiKey: process.env.STATVISOR_API_KEY }));
// Your routes
app.get("/users", (req, res) => {
res.json({ users: [] });
});
app.listen(3000);Set your environment variable
STATVISOR_API_KEY=vl_your_api_key_hereThe middleware must be registered before your route handlers. Place app.use(statvisor(β¦)) at the top of your middleware stack, before any app.use(router) calls.
Fastify Integration
Works with Fastify v4 and v5. Register as a plugin with fastify.register().
Install the SDK
npm install @statvisor/sdkRegister the plugin
import Fastify from "fastify";
import { fastify as statvisor } from "@statvisor/sdk";
const app = Fastify({ logger: true });
// Register Statvisor plugin
await app.register(statvisor, {
apiKey: process.env.STATVISOR_API_KEY,
});
// Your routes
app.get("/users", async (request, reply) => {
return { users: [] };
});
await app.listen({ port: 3000 });Set your environment variable
STATVISOR_API_KEY=vl_your_api_key_hereNestJS Integration
Coming soon. Native NestJS support is on the roadmap. In the meantime, you can instrument a NestJS app by using the Express adapter β NestJS uses Express under the hood by default, so registering the Express middleware in your main.ts works today.
import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app.module";
import { express as statvisor } from "@statvisor/sdk";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
// Register Statvisor before any other middleware
app.use(statvisor({ apiKey: process.env.STATVISOR_API_KEY }));
await app.listen(3000);
}
bootstrap();Hono Integration
Works with Hono on any runtime β Node.js, Bun, Deno, Cloudflare Workers.
Install the SDK
npm install @statvisor/sdkAdd the middleware
import { Hono } from "hono";
import { createMiddleware } from "@statvisor/sdk";
const app = new Hono();
// Add Statvisor before your routes
app.use("*", createMiddleware({ apiKey: process.env.STATVISOR_API_KEY }));
app.get("/users", (c) => {
return c.json({ users: [] });
});
export default app;Set your environment variable
# Node.js / Bun
STATVISOR_API_KEY=vl_your_api_key_here
# Cloudflare Workers β use wrangler.toml
[vars]
STATVISOR_API_KEY = "vl_your_api_key_here"Next.js Integration
Because Next.js API routes are serverless functions, Statvisor uses a route wrapper pattern. You initialise the SDK once in a shared file and use the returned route helper to wrap each route file's handlers.
Statvisor monitors your API routes (app/api/), not page routes or Server Actions. If your Next.js app proxies to a separate backend, instrument that backend directly with the Express or Fastify integration.
Install the SDK
npm install @statvisor/sdkInitialise once in a shared lib file
Create a file that initialises the SDK and exports the helpers. Import from this file in every API route.
import { nextjs } from "@statvisor/sdk";
export const { route, monitor } = nextjs({
apiKey: process.env.STATVISOR_API_KEY!,
});Wrap your route handlers
Use route() in each API route file. Pass the route path and an object of handlers β the returned object has the same keys ready to export.
import { NextResponse } from "next/server";
import { route } from "@/lib/statvisor";
export const { GET, POST } = route("/api/users", {
GET: async (request) => {
const users = await db.query("SELECT * FROM users");
return NextResponse.json({ users });
},
POST: async (request) => {
const body = await request.json();
const user = await db.create(body);
return NextResponse.json({ user }, { status: 201 });
},
});Dynamic route segments
Pass the route pattern with the dynamic segment. The SDK records it as the pattern (e.g. /api/users/:id), not the actual URL, so routes are properly grouped in your dashboard.
import { NextResponse } from "next/server";
import { route } from "@/lib/statvisor";
export const { GET } = route("/api/users/:id", {
GET: async (request, { params }) => {
const { id } = await params;
const user = await db.findById(id);
if (!user) return NextResponse.json({ error: "Not found" }, { status: 404 });
return NextResponse.json({ user });
},
});Set your environment variable
# Keep this server-side only β do NOT prefix with NEXT_PUBLIC_
STATVISOR_API_KEY=vl_your_api_key_hereThe API key must stay server-side. Never prefix it with NEXT_PUBLIC_ β that would expose it in your client bundle.
FastAPI Integration
Coming soon. A Python SDK with FastAPI / Starlette support is on the roadmap. You can follow progress or sign up for updates at hello@statvisor.com.
Django Integration
Coming soon. Django support is planned as part of the Python SDK. Reach out at hello@statvisor.com to be notified when it's available.
Configuration reference
All options are the same across Express, Fastify, Hono, and Next.js integrations.
| Option | Type | Default | Description |
|---|---|---|---|
| apiKey | string | β | Required. Your project API key (starts with vl_). |
| enabled | boolean | true | Set false to disable tracking (useful for local dev). |
| flushInterval | number | 5000 | How often (ms) the SDK flushes buffered events. |
| batchSize | number | 50 | Max events to include in a single flush. |
| ignoreRoutes | string[] | [] | Route paths to exclude from tracking (e.g. ["/health"]). |
| debug | boolean | false | Log SDK activity to console for troubleshooting. |
Example with all options
import { express as statvisor } from "@statvisor/sdk";
app.use(statvisor({
apiKey: process.env.STATVISOR_API_KEY,
enabled: process.env.NODE_ENV === "production",
flushInterval: 3000,
batchSize: 50,
ignoreRoutes: ["/health", "/ping", "/_internal"],
debug: false,
}));Using the dashboard
Once your SDK is sending data, the dashboard shows it in real time.
Projects list
The projects page shows all your monitored APIs. Each card displays the project name, domain, and a quick summary. Click a project to open its analytics dashboard. Use the copy button on a project card to copy the API key to your clipboard.
Analytics dashboard
Plans & limits
| Feature | Free | Pro |
|---|---|---|
| Projects | 1 | Unlimited |
| Data retention | 7 days | 30 days |
| Latency percentiles | P50 only | P50 / P95 / P99 |
| Custom expected codes | β | β |
| Volume chart | β | β |
| Route table | β | β |
| Support | Community | Priority |
| Price | $0 / mo | $19 / mo |
Upgrade or manage your plan from the Settings β Plan page. Billing is handled by Stripe. Cancel anytime.