From 8f12c70324b55dec7135670523da2e244a2dde41 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Tue, 6 Aug 2024 11:04:11 +0200 Subject: [PATCH 1/3] feat(sveltekit): Document new `wrapServerRouteWithSentry` wrapper --- .../guides/sveltekit/manual-setup.mdx | 104 ++++++++++++------ 1 file changed, 69 insertions(+), 35 deletions(-) diff --git a/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx b/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx index cfbd8c982fd749..e39d9f6aa5d212 100644 --- a/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx +++ b/docs/platforms/javascript/guides/sveltekit/manual-setup.mdx @@ -328,7 +328,7 @@ export default { If you disable automatic source maps upload, you must explicitly set a `release` value in your `Sentry.init()` configs. You can also skip the `sentry-cli` configuration step below. -### Configure Auto-Instrumentation +### Auto-Instrumentation The SDK primarily uses [SvelteKit's hooks](https://kit.svelte.dev/docs/hooks) to collect error and performance data. However, SvelteKit doesn't yet offer a hook for universal or server-only `load` function calls. Therefore, the SDK uses a Vite plugin to auto-instrument `load` functions so that you don't have to add a Sentry wrapper to each function manually. @@ -415,9 +415,59 @@ export default { }; ``` -#### Instrument `load` Functions Manually +#### Configure Client-side `fetch` Instrumentation + + -If you don't want to use auto-instrumentation, you can also manually instrument specific `load` functions with the SDK's `load` function wrappers. +Available since version `7.91.0` + + + +The `sentryHandle` function you added to your `handle` hook in `hooks.server.ts` during [server-side setup](#server-side-setup) injects a small inline `