All recipes
Sentry
CodeNode.jsDelivery errors
Forward SDK delivery errors to Sentry with the onError hook. The exception describes a problem sending telemetry; it does not establish that an upstream vendor request failed.
SDK availability
@checkupstream/sdk 0.1.0 is on npm and records requests made with fetch. The browser package is not published; contact us for access. Check the SDK reference for your runtime and review what the SDK sends.Forward SDK errors into Sentry
instrumentation.ts
import * as Sentry from "@sentry/node";
import { initCheckUpstream } from "@checkupstream/sdk/integrations/next";
export function register() {
const sdkKey = process.env.CHECKUPSTREAM_SDK_KEY;
if (!sdkKey) throw new Error("Set CHECKUPSTREAM_SDK_KEY before starting the app");
initCheckUpstream({
sdkKey,
onError: (error) => {
Sentry.captureException(error, {
tags: {
source: "checkupstream-sdk",
},
});
},
});
}Tip
Initialize Sentry before registering this hook. The example labels delivery failures with source: checkupstream-sdk; it does not add a vendor name or request status automatically.
Continue your setup
Check runtime availability and credentials before deploying an integration.