Comparison

Laravel Telescope for Node.js

Telescope's view of every request, with its exceptions, queries, logs, jobs and dumps, for Express, NestJS, Fastify, Koa and Hono apps.

npm install peekinside
Quick start

Laravel developers who move to Node.js tend to miss one thing first: Telescope, the page that shows every request your app handled, with its exceptions, database queries and log lines. Node.js has debuggers, loggers and error trackers, but not that one page.

PeekInside is that page for Node.js. Install one package, add one line, and a dashboard on your machine shows every request your app handles, with the errors it threw (and your lines of code around them), the queries it ran, the APIs it called, what it logged and the jobs it ran. It works with Express, Koa, Fastify, NestJS and Hono, needs no database or account, and the same SDK covers production through PeekInside Cloud.

import express from 'express';
import PeekInside from 'peekinside';

const app = express();
PeekInside.attach(app);

Start the app as usual: it prints the link to its dashboard, http://localhost:7335.

Telescope's watchers, in PeekInside#

Telescope records with watchers, one per kind of entry. Here is each of its 18 watchers and what PeekInside has instead:

Telescope watcher In PeekInside
Requests Every request: method, path, status, headers, bodies, the response, its duration and the user it was for
Exceptions Stack traces with your source lines (TypeScript through source maps), grouped into issues, linked to their request
Queries pg, mysql2, Prisma, MongoDB and Mongoose, so Knex, Sequelize, TypeORM, Drizzle and Kysely too, with slow queries and N+1 loops flagged
HTTP Client Outgoing calls through node:http, node:https (axios, got and the rest) and fetch
Logs The console, pino, winston and NestJS's Logger, each line linked to its request or job
Jobs BullMQ workers, node-cron, cron and @nestjs/schedule, with failures as exceptions
Schedule Scheduled jobs with their next run, and the runs they missed
Dumps PeekInside.dump(value): the value as a tree, under the request it was dumped in
Mail Every email sent with nodemailer: its HTML as a phone or a desktop shows it, its text and who it went to, linked to the request that sent it (see Mail previews)
Cache, Redis, Events, Models, Gates, Notifications, Views, Commands, Batches Not recorded. Many are Laravel concepts without a single Node.js equivalent

And a few things Telescope doesn't show:

  • Runtime: memory, CPU and event-loop delay, with the requests that were in flight when the event loop blocked.
  • Routes: every route's traffic, error rate and p50, p95 and p99 response times, with the routes that fail, run slow or query in a loop pointed out.
  • Timelines: each request on its own clock, its queries, calls and log lines in order, so the 400 ms spent in one query shows at a glance.
  • Compare: a request next to an earlier call of the same route, to see what changed.
  • Replay: a request sent to your app again from the dashboard, after a fix, and opened next to the original.

Setting it up for your framework#

PeekInside.attach(app) recognizes the framework from the app you give it:

PeekInside.attach(app);       // Express, Koa, Fastify or Hono
PeekInside.attach(nestApp);   // NestJS, before app.listen()
PeekInside.attach(server);    // http.createServer(...)

The framework pages say what each one shows: Express, NestJS, Fastify, Koa and Hono. PeekInside needs Node.js 18 or later.

Where the data lives#

Telescope stores its entries in your application's database, with migrations to run and a prune command to keep the table small. PeekInside keeps nothing in your database: the first app that starts with it also starts a small dashboard process on your machine, shared by every Node.js project you run. Its data lives in ~/.peekinside, the newest 1,000 requests and 500 exceptions of each project, and survives restarts of your app.

In production: Telescope and Nightwatch, PeekInside and Cloud#

Laravel pairs Telescope, for your machine, with Nightwatch, its hosted monitoring for production. PeekInside works the same way with one SDK:

  • On your laptop, the local dashboard is free, needs no account and keeps everything on your machine. It's off when NODE_ENV is production or test, and in CI.
  • On your servers, set PEEKINSIDE_API_KEY and the same package sends to PeekInside Cloud instead: the same pages for your team, and alerts by email and Slack from the Pro plan up. What it sends is encrypted before it leaves your server and decrypted in your browser, so PeekInside Cloud stores only ciphertext.

Questions#

Does PeekInside need a database or a migration?#

No. It reads your app from the inside (its HTTP server, database drivers and loggers) and keeps what it records in its own folder.

Will it slow my app down?#

What it records is queued and sent in batches, off the request path. Request and response bodies are captured up to 64 KB each.

Does it work with TypeScript and NestJS?#

Yes. Stack frames are mapped back to your .ts files through the source maps your build writes, and NestJS apps get their controller methods, exception filters, Logger lines and @nestjs/schedule jobs recorded: see NestJS.

Is it free?#

The local dashboard is free, and the SDK, the peekinside package on npm, is MIT-licensed. PeekInside Cloud is the paid part, per organization rather than per seat.

Try it on your app

Install the package, add PeekInside.attach(app), and start your app as usual: it prints the link to its dashboard. Free, no account, and your data stays on your machine. On your servers, the same line reports to PeekInside Cloud once it has an API key.