Features

Using the dashboard

Requests and routes, filters and the search syntax, the keyboard, each request in the inspector, and updates.

The local dashboard and PeekInside Cloud share the same interface: a live list of requests, an inspector for the one you pick, and pages for exceptions, routes, database queries, logs, jobs and the runtime.

Requests and routes#

The Requests page shows the same traffic two ways:

View What it shows
Requests Every request, live: its status, method, path (ids dimmed), queries, duration and size. One opens in the inspector beside the list
Routes Each route, ids folded (/orders/42 and /orders/43 are GET /orders/:id): requests, errors, error rate, p50 and p95, queries a request (flagged when some ran an N+1 loop), its last request and its activity. A route opens its requests. The Routes page goes further: windows, p99, what stands out, and each route up close

Above them, the requests' error rate, p50 and p95, how many were slow (a second or more) or ran an N+1 loop, and a chart of the traffic over the time loaded, by status class. Click a bar, or drag across several, to look at that time alone.

Filters#

The status buttons keep a status class (2xx to 5xx). Filters narrows by:

Filter Keeps requests
Method, status code with the methods or exact status codes picked, each counted
Duration at least as slow as a preset, or between two durations
Response size at least 10 kB, 100 kB or 1 MB
Received in the last 5 minutes up to the last 7 days, or the window picked on the chart
Has that threw an exception, ran an N+1 loop, a slow or duplicate query, any queries, called out, logged, blocked the event loop, or had a user
Environment, route, user, release from the ones picked, each counted

Filters in force show as chips beside the button; a click removes one, and Reset clears everything. The page's address keeps the view and the filters, so a filtered page can be bookmarked or shared. Filters search the requests loaded (the newest 5,000 at most); Load older requests looks further back.

Search syntax#

Type in the search box (press / to get there). Terms are combined with AND, and with the filters.

Example Matches
/api/users Method, status or URL containing the text
-health Excludes matching requests
method:POST, method:put,patch Request method
status:404, status:5xx, status:>=400 Status code, class or range
time:>200, time:>1.5s Response time in ms (or seconds)
queries:>10 Number of database queries (a bare number means at least)
db:>100, db:>1s Time spent in database queries
has:exception Requests that threw or reported an exception
has:n+1, has:slow, has:duplicates Ran an N+1 loop, a slow query, or duplicate queries
has:queries, has:http, has:logs Ran any queries, made outgoing calls, or wrote log lines
has:block The event loop was blocked while it ran (see Runtime)
user:ada Requests for a user whose id, email, name or phone number contains the text (see Users)
release:a1b2c3d, release:v2.4 Requests from a deploy (the first characters of a commit are enough)

Keyboard shortcuts#

Key Action
/ Focus the search box
↑ ↓ or j k Move through requests
1 to 6 Switch the inspector's tabs
Esc Close the inspector
P Pause or resume the live stream

The inspector#

The inspector has six tabs: Overview, Timeline, Queries, Request, Response and Compare. It shows bodies as a JSON tree or decoded form fields, compares each request's duration with the other calls to its route (p50 and p95), and copies any request as cURL or JSON. In the local dashboard, it also replays the request.

Compare two requests#

Compare puts the request next to another call to the same route (/orders/42 and /orders/43 count as one route). For a request that failed, it picks one that worked; for one that worked, the latest that failed; for a replay, the request it sent again; any other call can be picked instead. It lists what sets them apart, most telling first (the outcome, an exception, an outgoing call that failed, the time, queries that ran only in one or ran many more times, the input), then the queries, calls, query parameters, headers and bodies side by side, JSON bodies field by field. Headers that change on every request (dates, trace ids, the connection) are listed but never counted, and credentials stay masked.

Replay a request#

In the local dashboard, Replay in the inspector sends the request to your app again, as it was received: the same method, address, headers (cookies and Authorization included) and body. The replay opens on the Compare tab, next to the original, is marked as a replay in the list, and its overview links back to the original. After a fix, replay the request that failed and see it work, without rebuilding it in curl or Postman.

  • Only to your machine. The replay goes to the port your app's running process listens on, with the original Host header, so dev proxies and per-host routing behave as they did.
  • Only what was kept in full. A request whose body PeekInside didn't keep entirely (binary, or larger than maxBodySize) isn't sent, and the inspector says why. A body the app never read isn't sent either: there's none to send.
  • Not in PeekInside Cloud. Sending production traffic again can charge a card or send an email twice.

Replay needs PeekInside 1.4 or later in your app: it's what records the replay next to the original.

Authorization, cookies and token-like headers are masked on screen until you reveal them. Copy as cURL and Copy JSON include the real values.

Updates#

When a newer release of peekinside is out and an app runs an older one, the dashboard says so above the page: on the project's pages, and on the projects page for every app it applies to. It names the release each app runs (on PeekInside Cloud, in each environment), with the command that updates it:

npm install peekinside@latest

Then restart the app, or deploy it. The notice goes once the app runs the newest release. × hides it in this browser until the next release.

PeekInside Cloud reads the release from the batches each app sends. The local dashboard reads it from the apps that run, and the newest release from peekinside.dev, where its interface comes from.