Skip to main content
StackNext accepts query events from optional adapter packages. Both adapters send SQL text after redaction and never send bind parameters. Neither package is required for core telemetry, and neither is installed transitively by @stacknext/next. Add only the adapter the app uses.

Drizzle

Install the adapter:
Add the logger when you create the client:
Drizzle’s logger does not expose duration. Queries appear with durationMs: null; never rank or average them as if they were fast. Bind parameters are counted but never read or sent.
Set database.drizzle to true in stacknext.config.json so init, doctor and coverage can describe the intended setup. The flag does not register the logger.

Prisma

Install the adapter:
Prisma must be configured to emit query events. Then register the adapter:
The event-based query log level is required. instrumentPrismaClient is idempotent for the same client and returns a stop function. Prisma query events include a duration; SQL text is redacted and params are never read. Set database.prisma to true in stacknext.config.json for the same setup hints. The flag does not attach the event handler.

Verify

Make a request that queries the database, then check the Database page or:
not-observed means the current sample has no query evidence, not necessarily that the adapter is broken. A working app with no database traffic in the retention window also reports no queries. Database view listing redacted SQL shapes with ORM, operation, duration and trace correlation Database view listing redacted SQL shapes with ORM, operation, duration and trace correlation

Limits

  • Query text uses pattern-based redaction and may retain placeholders such as $1 and ?, as well as inline literals. Bind values are never captured.
  • Drizzle durations are null. Never compare them with Prisma durations as if both were measured.
  • StackNext does not run SQL, EXPLAIN or index analysis.
  • Database coverage is per adapter registration. StackNext does not infer which ORM you use at runtime.