🟢Node.js Integration

Node.js Outbound API Monitoring

Universal JavaScript SDK for any Node.js application. Patches http, https, and fetch at the runtime level.

Get started in seconds:

npm install @outboundiq/core

Works Everywhere Node.js Runs

The core package for any JavaScript runtime - use directly or as a base for framework integrations

🔧

CLI Tools

Scripts and automation

⚙️

Microservices

Custom servers

📡

Webhooks

Event handlers

🤖

Bots

Discord, Slack, Telegram

One Line Setup

import { register } from '@outboundiq/core/node';

// Initialize at the TOP of your app - before any other imports
register({ apiKey: process.env.OUTBOUNDIQ_KEY });

// Now ALL HTTP calls are automatically tracked!

// fetch
const response = await fetch('https://api.stripe.com/v1/charges');

// axios
const { data } = await axios.get('https://api.twilio.com/messages');

// got
const result = await got('https://api.sendgrid.com/v3/mail');

// native http/https
https.get('https://api.example.com', callback);

Universal HTTP Interception

Patches Node.js Core Modules

We patch http.request and https.request at the module level. This means every HTTP library built on top of them is automatically tracked.

  • ✓ http.request()
  • ✓ https.request()
  • ✓ http.get()
  • ✓ https.get()

Patches Global Fetch

Node.js 18+ includes native fetch. We patch globalThis.fetch to track all fetch calls regardless of which library uses it.

  • ✓ Native fetch()
  • ✓ node-fetch
  • ✓ undici
  • ✓ Any fetch polyfill

Every HTTP Library Works

fetch
axios
got
node-fetch
request
superagent
needle
bent

Fire-and-Forget

Metrics are sent asynchronously using native https.request. Your event loop is never blocked. Zero performance impact.

Manual User Context

Set user context with setUserContext() to track which user triggered each API call. Uses AsyncLocalStorage for propagation.

Smart Batching

Metrics are batched before sending. Configure batch size and flush intervals to optimize for your traffic patterns.

TypeScript Native

Written in TypeScript with full type definitions. Get autocomplete and type safety in your IDE.

Configuration Options

import { register } from '@outboundiq/core/node';

register({
  apiKey: process.env.OUTBOUNDIQ_KEY,
  
  // Optional configuration
  debug: true,           // Enable debug logging
  batchSize: 10,         // Flush after N calls (default: 10)
  flushInterval: 5000,   // Flush every N ms (default: 5000)
  timeout: 5000,         // Timeout for sending metrics
  
  // Ignore certain URLs
  ignorePatterns: [
    /health/,            // Ignore health checks
    /localhost/,         // Ignore local calls
  ],
});

Test Your Integration

Verify everything is working with a single command

npx outboundiq-test

Start Monitoring Your Node.js APIs Today

Free tier available. No credit card required.