Open History to see the last commit
1We use Sentry for watching for errors in our deployed application, as well as for instrumentation of our application.
2
3## Error collection
4
5Error collection is automatic and configured in `src/router.tsx`.
6
7## Instrumentation
8
9We want our server functions instrumented. So if you see a function name like `createServerFn`, you can instrument it with Sentry. You'll need to import `Sentry`:
10
11```tsx
12import * as Sentry from '@sentry/tanstackstart-react'
13```
14
15And then wrap the implementation of the server function with `Sentry.startSpan`, like so:
16
17```tsx
18Sentry.startSpan({ name: 'Requesting all the pokemon' }, async () => {
19 // Some lengthy operation here
20 await fetch('https://api.pokemon.com/data/')
21})
22```