All recipes
Sentry.
CodeNode.jsBrowser
Wire CheckUpstream's `onError` hook to `Sentry.captureException`. Failed flushes show up in Sentry tagged with the upstream service and HTTP status, so you can correlate them against the rest of your error volume.
Forward SDK errors into Sentry.
instrumentation.ts
import * as Sentry from "@sentry/node";
import { initCheckUpstream } from "@checkupstream/sdk/integrations/next";
export function register() {
initCheckUpstream({
sdkKey: process.env.CHECKUPSTREAM_SDK_KEY!,
onError: (error) => {
Sentry.captureException(error, {
tags: {
source: "checkupstream-sdk",
},
});
},
});
}Tip
Sentry already captures uncaught exceptions in your app code. The `onError` hook is for transient SDK problems — flush retries, network blips — that you'd otherwise never see.
Ship reliable upstream.
Drop the SDK in, point it at your project key, and start seeing live upstream telemetry inside the dashboard.