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 access required
Node.js and browser packages are not on public npm yet. Contact us for access before following the installation steps. 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.