Skip to content

Platforms

Node.js error monitoring and tracing

Install one package and call init with the project DSN. Buglapse reports uncaught exceptions, traces every incoming request and tells you when synchronous code stalls the process.

All Buglapse features

Node.js

What the Node.js SDK gives you

  • Uncaught exceptions and HTTP errors

    Crashes and unhandled rejections are reported before the process goes down, and failed outgoing requests are captured as errors.

  • A trace per request

    Every incoming request becomes a root span named after its method and path, with outgoing HTTP calls and your own spans nested under it.

  • Event loop blocks

    A huge JSON parse or a synchronous file call stalls every request at once, yet nothing throws. Buglapse notices such stalls and logs each one.

  • Source lines in the stack

    Stack frames come with the lines of code around them, read from disk, along with the Node version, OS and host name.

How it works

Install in a couple of minutes

  1. 1

    Create a project

    Sign up for free and create a project. Keep its DSN in an environment variable.

  2. 2

    Initialize at startup

    Install the package and call init before the rest of the application loads, with the integrations you need.

  3. 3

    Report handled errors

    Errors your framework catches in a route handler need one line in its error handler to reach Buglapse.

server.ts

Install

echo "@buglapse:registry=https://app.buglapse.com/npm/" >> .npmrc
npm install @buglapse/node
import { init } from '@buglapse/node'

init({ dsn: process.env.BUGLAPSE_DSN })

In detail

What is captured on the server

Requests are isolated from each other

A Node process handles many requests at once on one shared client. The HTTP server integration runs each request's handlers in their own scope, so tags, the user, breadcrumbs and the trace belong to that request only: an error in one request never carries breadcrumbs from another. Every event captured while a request is handled is stamped with its URL and method, and the request span is marked as failed for a server error response.

Traces across async code

The active span follows the asynchronous call chain across awaits, timers and promise callbacks, so nested spans end up in the right place without passing ids around. Queue jobs, cron runs and scripts become traces as soon as they are wrapped in a root span, and named numbers can be attached to any span as metrics.

On each plan

Compare all plans
On each plan
Free Pro Team
Projects210Unlimited
Errors / month5,00025,000150,000
Spans / month100,0001,000,00010,000,000

FAQ

Common questions

Still have questions?

Drop us a line — we'll help with setup, plans or self-hosting.

Contact us

or email hello@buglapse.com

Does it work with Express or Fastify?
Yes. Requests are traced at the level of Node's own HTTP server, so the framework on top does not matter. Errors a framework handles itself are reported with one call from its error handler.
Which Node.js versions are supported?
Node 18.19 or newer.
ESM or CommonJS?
Both. The package ships ESM and CommonJS builds, so import and require work alike.

See also

Tracing

A waterfall of spans for every page load, navigation and server request.

Learn more: Tracing

Logs

Structured logs next to errors and traces, searchable by message, level and attribute.

Learn more: Logs

Error tracking

Every error grouped into one issue with a readable stack trace, breadcrumbs, the steps to the error and the affected users.

Learn more: Error tracking

Ready to see what's happening in your app?

Create a project on the free plan and send your first event in a couple of minutes.

Still have questions? Email hello@buglapse.com