Setup
1
Install and connect the build
vite.config.ts. Keep your existing plugins, aliases, and deployment adapter. TanStack Start must precede the React plugin:vite.config.ts
2
Set browser and server keys
Copy the keys from your surface into the build environment:Provide
INTERFERE_PUBLIC_KEY and INTERFERE_ENVIRONMENT to the server runtime too. Use production for production deployments. Keep the secret key in the build environment.The server integration requires a Node.js runtime. The Cloudflare Workers deployment integration does not provide Node.js server instrumentation.3
Initialize browser capture
Add
init() to your router module, guarded so it runs only in the browser. Preserve your existing router options:src/router.tsx
4
Capture server requests
Add these request middleware entries to
src/start.ts. Initialization runs before Interfere opens a span for the request. Keep any existing middleware in the array:src/start.ts
5
Connect the root route
Add the provider around your root route’s content and include
Set consent at browser initialization and review replay masking before recording customer sessions.
traceMeta() in the head metadata. Preserve your existing document shell, styles, providers, and error boundaries. The example below shows where these additions fit.Root route example
Root route example
src/routes/__root.tsx