Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

_dot_cursorrules.append

22 lines702 Bytes

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 intstrumented. 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/browser'
13```
14​
15And then wrap the implementation of the server function with `Sentry.startSpan`, liks 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```