All recipes
SvelteKit.
CodeServer hooksSvelte
Wire CheckUpstream into `hooks.server.ts`. The handle wrapper initializes the SDK on first request and propagates request context to every outbound fetch.
1. Install.
Bash
npm install @checkupstream/sdk2. Wire into hooks.server.ts.
src/hooks.server.ts
import { checkUpstreamHandle } from "@checkupstream/sdk/integrations/sveltekit";
import { env } from "$env/dynamic/private";
export const handle = checkUpstreamHandle({
sdkKey: env.CHECKUPSTREAM_SDK_KEY,
});Tip
If you already have a `handle` chain, compose `checkUpstreamHandle()` into it with the `sequence()` helper from `@sveltejs/kit/hooks`.
Related
Ship reliable upstream.
Drop the SDK in, point it at your project key, and start seeing live upstream telemetry inside the dashboard.