All posts

Node.js Error Tracking: 5 Best Tools in 2026

Node.js error tracking compared: Bugsly, Sentry, Rollbar, Honeybadger and Airbrake. Express setup, serverless flushing, source maps and migration notes.

Node.js Error Tracking Challenges

Node.js presents unique error tracking challenges. Unhandled promise rejections, callback errors, event loop blocking, and memory leaks all require specialized handling. Add in the variety of frameworks (Express, NestJS, Fastify, Hapi) and deployment targets (containers, serverless, edge), and choosing the right tool matters.

Key Requirements for Node.js

  • Unhandled rejection handling: Capturing unhandled promise rejections is critical
  • Async context propagation: Errors should carry the right request context
  • Low overhead: Node.js is single-threaded, so the SDK must be lightweight
  • Source map support: TypeScript and bundled code need source maps
  • Serverless support: Lambda, Vercel, and Cloudflare Workers are common targets

Top Node.js Error Tracking Tools

1. Bugsly

Bugsly is a managed error tracker that accepts the Sentry protocol. Its @bugsly/node package is a thin wrapper that re-exports the official Sentry Node SDK, so instrumentation, async context tracking and framework support are the Sentry SDK's, and events are grouped into issues and explained by AI analysis on the Bugsly side.

import * as Bugsly from '@bugsly/node';

Bugsly.init({ dsn: 'https://<public-key>@bugsly.dev/<project-id>' });

Strengths: Uses the standard Sentry SDK (no proprietary agent), AI error analysis, a free plan, a DSN swap away from an existing Sentry setup.

Weaknesses: Managed service only (no self-hosting), newer product with a smaller community than Sentry.

2. Sentry

Sentry has a comprehensive Node.js SDK with support for Express, Koa, Hapi, Fastify, NestJS, and more. Its profiling integration for Node.js helps identify performance bottlenecks alongside errors.

Strengths: Broadest framework support, profiling, mature SDK.

Weaknesses: Heavier SDK, complex configuration options.

3. Rollbar

Rollbar provides solid Node.js error tracking with good Express support. Its telemetry feature captures console logs and HTTP requests leading up to an error.

Strengths: Good telemetry, simple pricing.

Weaknesses: Limited framework support beyond Express.

4. Honeybadger

Honeybadger offers a clean, straightforward Node.js integration with built-in support for Express and background job monitoring.

Strengths: Simple interface, check-ins for cron jobs.

Weaknesses: Smaller ecosystem, no AI features.

5. Airbrake

Airbrake's Node.js notifier is lightweight and provides solid error reporting with performance monitoring.

Strengths: Lightweight, stable.

Weaknesses: Limited modern features.

Node.js error tracking tools at a glance

ToolNode.js SDKBest fit
BugslyOfficial Sentry SDK via @bugsly/node and a Bugsly DSNTeams that want Sentry-compatible tracking with AI analysis and no infrastructure to run
Sentry@sentry/node and framework packagesBroadest framework coverage and the largest community
RollbarRollbar's own notifierExpress apps that value telemetry before the error
HoneybadgerHoneybadger's own notifierSmall teams that want errors plus cron check-ins in a simple tool
AirbrakeAirbrake's own notifierLightweight reporting with performance monitoring

Vendor feature sets and prices change; confirm details on each vendor's site before you decide. For how Bugsly is priced see pricing.

Node.js error tracking setup with Bugsly

Initialize the SDK before anything else is imported so it can instrument modules as they load. In ESM, put the init call in its own file and preload it:

// instrument.mjs
import * as Bugsly from '@bugsly/node';

Bugsly.init({
  dsn: 'https://<public-key>@bugsly.dev/<project-id>',
  environment: 'production',
  release: 'api@1.4.2',
  tracesSampleRate: 0.2, // share of requests recorded for performance tracing
});
node --import ./instrument.mjs app.mjs

For Express, register the error handler after your routes and before your own error middleware:

import express from 'express';
import * as Bugsly from '@bugsly/node';

const app = express();

app.get('/api/users', usersHandler);

Bugsly.setupExpressErrorHandler(app);

app.use((err, req, res, next) => {
  res.status(500).json({ error: 'Internal server error' });
});

Every error then arrives with the request URL and method, and signup does not ask for a card: create an account to get your DSN. The Node.js integration guide and Express guide cover the rest. Because the package re-exports @sentry/node, you can equally install @sentry/node directly and use the same Bugsly DSN.

Handling Common Node.js Patterns

Unhandled Promise Rejections

Starting with Node.js 15, unhandled promise rejections crash the process by default. The SDK registers handlers for uncaughtException and unhandledRejection when you call init, so you do not need your own process.on listener just to report them. Initialize it first so it is registered before your code runs.

Express Error Middleware

Always place your error tracking handler after all routes but before your custom error handler, as in the example above. A handler registered before the routes never sees their errors.

Serverless Functions

On AWS Lambda or Vercel the runtime can freeze the process as soon as your function returns, so events may never be sent. Flush before returning:

import * as Bugsly from '@bugsly/node';

export const handler = async (event) => {
  try {
    return await doWork(event);
  } catch (err) {
    Bugsly.captureException(err);
    throw err;
  } finally {
    await Bugsly.flush(2000);
  }
};

Source maps for TypeScript and bundled code

Upload source maps with sentry-cli pointed at Bugsly (SENTRY_URL=https://bugsly.dev) so stack traces show your TypeScript files instead of compiled output. Run sentry-cli sourcemaps inject ./dist and then sentry-cli sourcemaps upload --release "$VERSION" ./dist as part of your build, and set the same release in init.

Moving from Sentry or another tool

  • From Sentry: keep your SDK, change the DSN, and confirm a test error arrives. See the Sentry alternative guide.
  • From Rollbar, Honeybadger or Airbrake: replace their notifier with the Sentry SDK (@bugsly/node) and map your calls: report errors with captureException, attach user data with setUser and extra data with setContext or setTag. Re-create alert rules in Bugsly. See the Rollbar and Honeybadger comparisons.

Recommendation

For Node.js applications, prioritize SDK overhead and async context handling. Bugsly and Sentry both use the same underlying SDK, so the real decision is where events go: choose Sentry for the broadest ecosystem and self-hosting options, or Bugsly if you want managed Sentry-compatible tracking with AI analysis included on every plan. If you build with React on the front end too, see React error tracking; for the Python side of a stack, the Python performance monitoring guide.

Frequently asked questions

What is the best error tracking tool for Node.js?

It depends on what you need. Sentry has the broadest framework coverage and can be self-hosted. Bugsly uses the same Sentry Node SDK against a managed backend with AI analysis and a free plan. Rollbar, Honeybadger and Airbrake use their own notifiers and suit teams already on those products.

Does Bugsly work with Express, NestJS and Fastify?

@bugsly/node re-exports the Sentry Node SDK, so its Express integration (setupExpressErrorHandler) works with a Bugsly DSN. For other frameworks, use the matching Sentry integration with your Bugsly DSN.

Does Bugsly capture unhandled promise rejections?

Yes. The SDK reports unhandled rejections and uncaught exceptions once init has run.

How do I move a Node.js app from Sentry to Bugsly?

Change the dsn value passed to init to your Bugsly DSN. Your existing @sentry/node code keeps working.

Try Bugsly Free

Track up to 100 issues per month on the free plan; events are not billed.

Get Started Free

From the same team