diff --git a/docs/platforms/javascript/guides/solid/features/tanstack-router.mdx b/docs/platforms/javascript/guides/solid/features/tanstack-router.mdx new file mode 100644 index 0000000000000..a385555c346fe --- /dev/null +++ b/docs/platforms/javascript/guides/solid/features/tanstack-router.mdx @@ -0,0 +1,42 @@ +--- +title: TanStack Router +description: "Learn about Sentry's TanStack Router integration." +--- + +The TanStack Router integration is included in the `@sentry/solid` package and is compatible with version `1.64.0` of `@tanstack/solid-router` and above. + + + +The TanStack Router integration is designed to work with Sentry Tracing. Please see Getting Started with Solid Performance for more details on how to set up and install the SDK. + + + +The TanStack Router instrumentation uses your TanStack Router routes to create `pageload/navigation` transactions to ensure you collect meaningful performance data about the health of your page loads and associated requests. + +## Usage + +To use the TanStack Router integration, pass the `Sentry.tanstackRouterBrowserTracingIntegration` inside your `integrations` option: + +```javascript +import * as Sentry from "@sentry/solid"; +import { createRouter } from "@tanstack/solid-router"; + +const router = createRouter({ + // Your router options... +}); + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)], + + // Setting a sample rate is required for sending performance data. + // We recommend adjusting this value in production, or using tracesSampler + // for finer control. + tracesSampleRate: 1.0, +}); +``` + +## Next Steps: + +- [Return to **Getting Started**](../../) +- [Return to the main integrations page](../)