Watchers
Watchers are what Lens captures. Each one records a type of signal — requests, database queries, cache operations, exceptions, mail, jobs, and more — and correlates it to the request that produced it. Enable the ones you need; ignore the rest.
Most watchers live in your framework adapter and are toggled from your lens() config. The ORM, cache, and mailer integrations ship in the watchers package:
npm install @lensjs/watchersAvailable watchers
Requests
Incoming HTTP requests with headers, body, response, status, duration, and user.
Database Queries
Prisma, Kysely, Sequelize, MikroORM, Drizzle, Mongoose, and Lucid.
Cache
Hits, misses, writes, and evictions across your caching layer.
Exceptions
Automatic capture with stack traces and fingerprint grouping.
Outgoing email with MIME previews, iCalendar, and attachments.
HTTP Client
Outbound fetch calls, with W3C trace propagation.
Events
Application events emitted during a request.
Redis
Redis commands issued by your app.
FCM (Push)
Firebase Cloud Messaging push notifications.
Logs
Console, pino, and winston log lines.
Jobs & Queues
BullMQ and Agenda jobs as they run.
How enabling works
Request and exception watchers are on by default. The rest are opt-in via flags like
cacheWatcherEnabled, mailWatcherEnabled, or a queryWatcher handler — see each watcher's page and the Configuration reference.