Skip to main content

What is the Steadwing Node SDK?

The Steadwing Node SDK auto-captures exceptions, error logs, and HTTP breadcrumbs from your Node.js applications and sends them to Steadwing for root cause analysis. Add two lines of code and Steadwing starts monitoring your application no manual instrumentation required.

Auto-Capture

Unhandled exceptions, rejections, and error logs captured automatically

HTTP Breadcrumbs

Outgoing HTTP/HTTPS requests recorded with method, URL, status, and duration

Express & Fastify

Route error capture with full request context

Data Scrubbing

Sensitive fields (passwords, tokens, API keys) redacted before sending

Installation

Requires Node.js 18+. View on npm or browse the source on GitHub.

Quick Start

Get your API key from app.steadwing.com/organization, then initialize the SDK:
That’s it. The SDK automatically:
  • Captures unhandled exceptions (uncaughtException)
  • Captures unhandled promise rejections (unhandledRejection)
  • Captures console.error(), winston, and pino error-level logs
  • Records outgoing HTTP/HTTPS requests as breadcrumbs
  • Sends heartbeats every 60 seconds

Configuration

Only events sent with env="PROD" are considered for auto-monitoring. Events from other environments are received but will not trigger automated RCA.

Manual Capture

For cases where you want to explicitly report errors or messages:

What Gets Captured

Exceptions

Logs

  • console.error() sent as events
  • Winston error/crit/emerg-level logs sent as events
  • Pino error/fatal-level logs sent as events
  • All log levels recorded as breadcrumbs for context

HTTP Breadcrumbs

Every outgoing HTTP/HTTPS request is recorded with:
  • Method and URL
  • Response status code
  • Request duration
  • Rolling buffer of last 100 entries

Data Scrubbing

Sensitive data is automatically scrubbed before leaving your application. Keys matching the following patterns (case-insensitive) have their values replaced with [REDACTED]:

Framework Support

Express

Add the error handler as your last middleware:

Fastify

Register the plugin on your Fastify instance:
Winston and pino are captured automatically when installed, no extra code needed.

TypeScript

Full TypeScript support with exported types:

FAQs

No. After calling steadwing.init(), the SDK hooks into Node’s exception handling, console, and HTTP modules automatically. For Express/Fastify request context, add one line of middleware.
Minimal. Events are batched and sent every 5 seconds in a non-blocking flush. Breadcrumbs are stored in a fixed-size buffer. Timers use unref() so the SDK never keeps your process alive.
Yes. Pass enabled: false to steadwing.init() and the SDK becomes a no-op, no patches are installed and no events are sent.
The SDK coexists with other error trackers. It listens on process.on('uncaughtException') and patches console.error without removing existing listeners or handlers.
Sensitive fields are scrubbed before transmission. Data is sent over HTTPS to Steadwing’s backend. See the Data Scrubbing section for details on what’s redacted.
Need help? Contact us at hello@steadwing.com