APILensAPILens
12 framework adapters

Your framework.
Your observability setup.

Generic HTTP interceptors break when you add middleware, swap routers, or move to edge runtimes. auto-api-observe ships 12 framework-native adapters — each one uses your framework's own lifecycle hooks, not monkey-patching of Node's `http` core.

Switch from Express to Fastify? Change one import line. All 12 adapters produce the same JSON shape, ship to the same dashboard, and use the same API key — so you never migrate your observability stack when you migrate your framework.

$npm install auto-api-observe

Feature Compatibility

All adapters support request tracing and distributed trace IDs. DB profiling, outbound HTTP, and process metrics availability varies by runtime.

FrameworkAuto DBOutbound HTTPProcess MetricsEdge / Lambda
Express
Fastify
Koa
NestJS
Hono
Next.js
Hapi
Elysia
Apollo
Lambda
tRPC
Restify

Which adapter should I use?

Express

If you're already on Express 4 or 5 — use the default export. `app.use(observe(...))` and you're done. Zero framework-specific config required.

Fastify

Use `fastifyObservability`. It registers as a native Fastify plugin via `addHook('onRequest', ...)` and `addHook('onResponse', ...)` — no middleware wrapping, no overhead.

NestJS

Use `nestjsObservability` as a global middleware in your `AppModule`. Works with the NestJS DI container — access the trace context from any injectable service.

Lambda / Edge

Use `lambdaObservability` for AWS Lambda or `honoObservability` for Cloudflare Workers. Process metrics are disabled by design — serverless functions don't have persistent process state.

Package stats

12
Framework adapters
9
DB libs auto-patched
0
Runtime dependencies
107
Tests passing

Framework-Agnostic API

All adapters ship in one package. Import only what you need — no tree-shaking config required.

// Express (default export)
const observe = require('auto-api-observe');
app.use(observe({ apiKey: process.env.APILENS_KEY }));

// Fastify
const { fastifyObservability } = require('auto-api-observe');
app.register(fastifyObservability, { apiKey: process.env.APILENS_KEY });

// Koa
const { koaObservability } = require('auto-api-observe');
app.use(koaObservability({ apiKey: process.env.APILENS_KEY }));

// NestJS, Hono, Next.js, Hapi, Elysia, Apollo, Lambda, tRPC, Restify
// — each has a named export: frameworkObservability({ apiKey })

Pick your framework. Get your key.

Free during beta. No credit card. No agent install. Your dashboard starts filling up the moment you add one line of middleware.