Frameworks
- Express
- Fastify
- Koa
- Hono
- Next.js
- node:http
One middleware for Express, Fastify, Koa, Hono, or Next.js. One line per database, queue, and logger. Outgoing fetch is traced for free.
const wizelens = createWizeLens({ serviceName: "orders-api" }); instrumentPg(wizelens, pg); instrumentPino(wizelens, logger); instrumentAmqplib(wizelens, amqplib); const app = express(); app.use(wizelens.middleware);
Everything below lands in the same trace as the request that caused it.
No agent and no require hooks to set up. You tell WizeLens about the driver you use, and every query on it is traced.
instrumentPg(wizelens, pg)Prisma on pg, or Drizzle on better-sqlite3? The ORM and the driver under it never record the same query twice.
WizeLens copies each line into its trace. Your logger still writes to the console, a file, or wherever it wrote before.
On unless NODE_ENV is production. Turn it on there yourself, and add sampling for busy services.
A React front end, a .NET gateway, and a Node service follow the same rules and join the same trace.