Follow a failure from the click to the database.
DevLens traces each request from the browser through your server to the database, points at the step that broke, and hands that evidence to your AI coding agent.
Using an AI coding agent?Copies a setup prompt.
Step 1 of 5: Submit registration
How it works
- 1Instrument your appAdd the browser SDK, and the server SDK for Next.js or OpenTelemetry for any other backend. Each click, request, function and query becomes a step in one trace.
- 2See the failing pathOpen a failed trace: Browser, Server and Database lanes show the journey, and Walk through explains each step in plain words.
- 3Hand it to your agentCopy the failing path as context for your AI coding agent, or let the agent fetch failing traces itself through the DevLens MCP server, a plug-in your agent can call.
Connect your stack in minutes
Full setup guideNext.js through the DevLens SDKs. Every other backend through OpenTelemetry, the open standard for tracing, mostly with no code changes. After sign-up, your project's keys are filled in for you.
Showing Next.js setup
- 1Install
npm install @devlenshq/sdk-browser @devlenshq/sdk-node
- 2Point it at DevLens
NEXT_PUBLIC_DEVLENS_ENDPOINT="https://devlenshq.dev/api/ingest" NEXT_PUBLIC_DEVLENS_KEY="<your pk_ public key>" DEVLENS_SECRET_KEY="<your sk_ secret key>"
- 3Add to your app
// lib/devlens.ts import path from "node:path"; import { configure } from "@devlenshq/sdk-node";
What leaves your app: step names, timings, status and error codes, error messages and file:line. Request bodies and query arguments are never recorded, and emails and tokens are redacted. How DevLens handles data
Full setup guide- Frontend
- Next.js
- React
- Vue
- Svelte
or any web app: the browser SDK is plain JavaScript.
- Database
- PostgreSQL
- MySQL
- SQLite
- MongoDB
- Prisma
Prisma through the DevLens SDK; the others through OpenTelemetry's instrumentation for your language.
Hand it to your agent
Your AI coding agent can list the failing traces, read the failing path and open it in your browser, through the DevLens MCP server. It only reads: it can never change your project.
claude mcp add devlens --env DEVLENS_URL=https://devlenshq.dev --env DEVLENS_READ_TOKEN=<your rt_ read token> -- npx -y @devlenshq/mcp
Cursor, VS Code, Claude Desktop and other MCP clients take one config entry. The read token comes from your project's Keys & settings.
> Why does sign-up fail for some users?
devlens · list_failed_traces
Submit registration · DemoUser.create P2002 · 2 min ago
devlens · get_trace_context
Root cause: DemoUser.createP2002unique constraint on email · registration.ts:14
The email is already registered. registration.ts:14 creates the user without checking first: I'll catch P2002 there and return 409 with a clear message.
Follow your own failures to the root cause.
Try the demo without an account, or connect your app in minutes.