Requests
- traceparent on every fetch and XHR
- Same origin, or what you allow
- Joins the server trace
Two lines in hooks.client.ts, one in your root layout. Every fetch links to the server trace it started, the first page load joins the server that rendered it, and errors carry their route.
// src/hooks.client.ts initWizeLens({ endpoint: "/_wizelens", enabled: dev }); export const handleError = createHandleError(); // src/routes/+layout.svelte trackSvelteKitNavigation(afterNavigate);
Everything below lands in the same trace as the request that caused it.
When your SvelteKit server runs WizeLens for Node, the first page load joins the server's trace: the render, its queries, and the page's Web Vitals together.
createHandleError sends each client error with its route id, like /products/[id], then runs your own handler.
createHandleError(({ message }) => ({ message }))The package does not import svelte or $app/*. You pass it afterNavigate, and each client-side navigation is a page view. The first load already is one.
trackSvelteKitNavigation(afterNavigate)In a plain Svelte app, call trackNavigation() after initWizeLens. Hash mode covers svelte-spa-router.
trackNavigation({ mode: "hash" })A Vue front end, a .NET gateway, a Node service, and a Python worker join the same trace, and the same insights run on all of it.