Skip to content

Commit fedc839

Browse files
committed
docs(solid): adds TanStack Router Solid docs page
1 parent 34a46af commit fedc839

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: TanStack Router
3+
description: "Learn about Sentry's TanStack Router integration."
4+
---
5+
6+
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.
7+
8+
<Alert title="Note">
9+
10+
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.
11+
12+
</Alert>
13+
14+
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.
15+
16+
## Usage
17+
18+
To use the TanStack Router integration, pass the `Sentry.tanstackRouterBrowserTracingIntegration` inside your `integrations` option:
19+
20+
```javascript
21+
import * as Sentry from "@sentry/solid";
22+
import { createRouter } from "@tanstack/solid-router";
23+
24+
const router = createRouter({
25+
// Your router options...
26+
});
27+
28+
Sentry.init({
29+
dsn: "___PUBLIC_DSN___",
30+
integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)],
31+
32+
// Setting a sample rate is required for sending performance data.
33+
// We recommend adjusting this value in production, or using tracesSampler
34+
// for finer control.
35+
tracesSampleRate: 1.0,
36+
});
37+
```
38+
39+
## Next Steps:
40+
41+
- [Return to **Getting Started**](../../)
42+
- [Return to the main integrations page](../)

0 commit comments

Comments
 (0)