⚑Express.js Integration

Express.js Outbound API Monitoring

Automatically track every fetch, axios, and HTTP call in your Express app. One line of code. Zero performance impact.

Get started in seconds:

npm install @outboundiq/express

Universal HTTP Interception

One init call patches all HTTP modules. Every library just works.

πŸ”Œ

1. Initialize

Call initExpress() at the top of your app

πŸ•ΈοΈ

2. Auto-Patching

We patch http, https, and fetch modules automatically

πŸ“Š

3. All Tracked

fetch, axios, got, node-fetch - everything works

Works With Every HTTP Library

fetch()
axios
got
node-fetch
request
http.request
https.request
superagent

Simple Setup

import express from 'express';
import { initExpress, userContextMiddleware } from '@outboundiq/express';

const app = express();

// Initialize OutboundIQ FIRST - patches all HTTP modules
initExpress({ apiKey: process.env.OUTBOUNDIQ_KEY });

// Optional: Track which user made each API call
app.use(userContextMiddleware());

// Your routes - everything is automatically tracked!
app.get('/api/payment', async (req, res) => {
  // This fetch is tracked
  const stripe = await fetch('https://api.stripe.com/v1/charges');
  
  // This axios call is also tracked
  const paystack = await axios.post('https://api.paystack.co/transaction');
  
  res.json({ stripe: await stripe.json(), paystack: paystack.data });
});

app.listen(3000);

βœ“Fire-and-Forget

Metrics are sent asynchronously. Your response times are never affected. We use background HTTP calls that don't block the event loop.

βœ“User Context Middleware

Automatically captures req.user from Passport, express-jwt, or any auth middleware. Know exactly which user triggered each API call.

βœ“TypeScript Support

Full TypeScript definitions included. Get autocomplete and type safety for all configuration options.

βœ“Smart Batching

Metrics are batched and sent efficiently. Configurable batch size and flush intervals for optimal performance.

Test Your Integration

Verify everything is working with a single command

npx outboundiq-test

Start Monitoring Your Express APIs Today

Free tier available. No credit card required.