From 0b669cfaf13a2d28699faaca3e5835d0c168cb0d Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 29 May 2024 17:02:56 +0200 Subject: [PATCH 1/2] Add TanStack Router docs --- .../guides/react/features/tanstack-router.mdx | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/platforms/javascript/guides/react/features/tanstack-router.mdx diff --git a/docs/platforms/javascript/guides/react/features/tanstack-router.mdx b/docs/platforms/javascript/guides/react/features/tanstack-router.mdx new file mode 100644 index 0000000000000..619f3eac489c1 --- /dev/null +++ b/docs/platforms/javascript/guides/react/features/tanstack-router.mdx @@ -0,0 +1,44 @@ +--- +title: TanStack Router +description: "Learn about Sentry's TanStack Router integration." +--- + +_(Available in version TODO and above)_ + +TanStack Router support is included in the `@sentry/react` package since version `TODO` and is only compatible with version `1.34.5` of ` `@tanstack/router` and above. + + + +The TanStack Router integration is designed to work with Sentry Performance Monitoring. Please see Getting Started with React 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/react"; +import { createRouter } from "@tanstack/react-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](../) From 75e79c004b36cef44b6668a057d7ee85f4fddfd0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 29 May 2024 20:25:33 +0200 Subject: [PATCH 2/2] Add supported version --- .../javascript/guides/react/features/tanstack-router.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/guides/react/features/tanstack-router.mdx b/docs/platforms/javascript/guides/react/features/tanstack-router.mdx index 619f3eac489c1..29c11ae0c3589 100644 --- a/docs/platforms/javascript/guides/react/features/tanstack-router.mdx +++ b/docs/platforms/javascript/guides/react/features/tanstack-router.mdx @@ -3,9 +3,9 @@ title: TanStack Router description: "Learn about Sentry's TanStack Router integration." --- -_(Available in version TODO and above)_ +_(Available in version 8.7.0 and above)_ -TanStack Router support is included in the `@sentry/react` package since version `TODO` and is only compatible with version `1.34.5` of ` `@tanstack/router` and above. +TanStack Router support is included in the `@sentry/react` package since version `8.7.0` and is only compatible with version `1.34.5` of ` `@tanstack/router` and above.