Backend debugging often relies on scattered console.log() statements, browser network tabs, and server logs. As applications grow, understanding how a request moves through middleware, controllers, services, databases, and external APIs becomes increasingly difficult.
To solve this problem, I built SuriLensβan open-source real-time backend execution visualizer and observability toolkit for Node.js.
It helps developers understand exactly what happens inside their backend while requests are being processed.
β¨ Why I Built SuriLens
While building production-grade Node.js applications, I often found myself asking questions like:
Which middleware executed first?
Where is this request spending most of its time?
Which controller handled the request?
Which database query was executed?
Which external APIs were called?
Which payload changed between different stages?
Why is this request slow?
Finding these answers usually meant adding temporary logs, restarting the server, and repeating the same process.
I wanted a tool that could visualize everything automatically.
That's how SuriLens was created.
π What is SuriLens?
SuriLens is a lightweight runtime observability package that automatically instruments your Node.js application and displays the complete execution flow inside an interactive dashboard.
Instead of reading logs, you can literally watch requests travel through your backend.
π Features
β‘ Real-time request visualization
π Live execution graph
π Automatic request tracing
π§© Dynamic node generation
π¦ Payload inspection
π Payload diff viewer
π¬ Execution replay
π Timeline visualization
π‘ WebSocket-powered live updates
π Express support
π Fastify support
π Koa support
π NestJS support
π Hono support
π§ Plugin SDK
π Sensitive data masking
π€ Session export/import
π Performance metrics
π¨ Slow request detection
π¨ Slow step detection
π W3C Distributed Tracing support
πΈ How It Works
Every incoming request is automatically traced.
Instead of manually adding logs:
Client
β
βΌ
Express
β
βΌ
Middleware
β
βΌ
Controller
β
βΌ
Service
β
βΌ
Database
β
βΌ
External API
β
βΌ
Response
SuriLens visualizes this flow in real time with animated execution packets, timing information, payload transformations, and performance metrics.
π» Installation
npm install surilens
π Quick Start
import express from "express";
import suriLens from "surilens";
const app = express();
app.use(suriLens());
app.get("/", (req, res) => {
res.json({
message: "Hello World"
});
});
app.listen(3000);
Open:
and start watching your backend execute in real time.
π₯ Dashboard Includes
Live execution graph
Timeline
Payload inspector
Request details
Response details
Performance metrics
Search
Filters
Replay engine
Dynamic execution nodes
π Supported Frameworks
Express
Fastify
NestJS
Koa
Hono
π Security
SuriLens automatically masks sensitive information such as:
Passwords
Authorization headers
Tokens
Cookies
API keys
Secrets
before broadcasting trace data.
β‘ Performance
Designed to be lightweight for development and observability.
Highlights include:
AsyncLocalStorage-based tracing
Automatic instrumentation
WebSocket streaming
Minimal runtime overhead
Dynamic execution graph
Live packet animations
π Open Source
SuriLens is completely open source.
Contributions, issues, feature requests, and feedback are always welcome.
π Links
GitHub
https://github.com/sonisuryansh/surilens
npm
https://www.npmjs.com/package/surilens
π Feedback Welcome
This is the first public release of SuriLens, and I'd love feedback from the developer community.
If you try it in your project, let me know:
What you liked
What could be improved
Which framework you'd like supported next
Features you'd like to see in future releases
Happy coding! π
Top comments (0)