Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.

<Alert title="Note">

The TanStack Router integration is designed to work with Sentry Tracing. Please see <PlatformLink to="/tracing/#enable-tracing">Getting Started with Solid Performance</PlatformLink> for more details on how to set up and install the SDK.

</Alert>

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](../)
Loading