Reference
Integration Recipes.
Production-ready code you can paste, plus setup guides for dashboard integrations.
Code.
Paste these into your codebase. Each one works out of the box with a valid API key.
Sentry
typescriptHook into onError and send upstream failures straight to Sentry with the service name and status as tags.
import * as Sentry from "@sentry/node";
import { checkupstream } from "@checkupstream/sdk";
checkupstream.init({
sdkKey: process.env.CHECKUPSTREAM_SDK_KEY,
onError: (error, context) => {
Sentry.captureException(error, {
tags: {
upstream_service: context.service,
upstream_status: context.status,
},
});
},
});Next.js
typescriptUse after() to flush telemetry after the response ships. No blocking, no cold start penalty.
import { after } from "next/server";
import { checkupstream } from "@checkupstream/sdk";
checkupstream.init({
sdkKey: process.env.CHECKUPSTREAM_SDK_KEY,
});
export async function GET() {
const data = await fetchUpstreamService();
// Flush telemetry after the response is sent
after(async () => {
await checkupstream.flush();
});
return Response.json(data);
}Express
typescriptOne line of middleware. Every outbound HTTP call to a known service gets tracked automatically.
import express from "express";
import { checkupstream } from "@checkupstream/sdk";
import { expressMiddleware } from "@checkupstream/sdk/express";
const app = express();
checkupstream.init({
sdkKey: process.env.CHECKUPSTREAM_SDK_KEY,
});
app.use(expressMiddleware());
app.get("/api/users", async (req, res) => {
// Calls to Stripe, OpenAI, etc. are
// automatically tracked
const users = await db.getUsers();
res.json(users);
});
app.listen(3000);GitHub Actions
yamlRun a health check in CI before you deploy. Fail the build if a critical dependency is down.
name: Dependency Health Check
on:
pull_request:
branches: [main]
schedule:
- cron: "0 8 * * 1" # Weekly Monday 8am
jobs:
check-upstream:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run CheckUpstream scan
run: npx @checkupstream/cli scan
env:
CHECKUPSTREAM_API_TOKEN: ${{ secrets.CHECKUPSTREAM_API_TOKEN }}
- name: Check for critical risks
run: npx @checkupstream/cli risk --fail-on critical
env:
CHECKUPSTREAM_API_TOKEN: ${{ secrets.CHECKUPSTREAM_API_TOKEN }}Dashboard Setup.
These integrations are configured from the dashboard. No code changes needed.
Slack
Open SettingsGet alerts in a Slack channel when upstream services degrade or go down.
- 1Go to Settings → Integrations
- 2Click "Add to Slack"
- 3Pick a channel (we recommend a dedicated #upstream-status)
- 4Choose which events to receive: incident.created, incident.resolved, service.degraded, or dependency.risk_changed
You can also configure this through the API. See the Alert Channels docs for the full webhook setup.
PagerDuty
Open SettingsTrigger PagerDuty incidents automatically when an upstream service has a major outage.
- 1In PagerDuty, create an Events API v2 integration and copy the routing key
- 2Go to Settings → Webhooks in CheckUpstream
- 3Add a webhook pointing at https://events.pagerduty.com/integration/<KEY>/enqueue
- 4Select incident.created and incident.updated events
CheckUpstream sends standard webhook payloads. PagerDuty auto-resolves when we send incident.resolved.
Need something else?
We support 12 alert channels and 8 SDKs. If your integration isn't here, request it and we'll build it.