Skip to main content
All recipes

Express.

CodeMiddlewareNode.js

Mount the CheckUpstream middleware on your Express app. Outbound HTTP calls inside each request get tagged with the route, method, and any custom labels you attach.

1. Install.

Bash
npm install @checkupstream/sdk

2. Mount the middleware.

server.ts
import express from "express";
import { checkUpstreamMiddleware } from "@checkupstream/sdk/integrations/express";

const app = express();

app.use(
  checkUpstreamMiddleware({
    sdkKey: process.env.CHECKUPSTREAM_SDK_KEY!,
    services: ["api.stripe.com", "api.openai.com"],
  }),
);

app.get("/api/users", async (_req, res) => {
  // Outbound calls here are tracked automatically.
  const users = await fetchUsers();
  res.json(users);
});

app.listen(3000);

Ship reliable upstream.

Drop the SDK in, point it at your project key, and start seeing live upstream telemetry inside the dashboard.