Back to Sentry Javascript

Official Sentry SDK for TanStack Start React (Beta)

packages/tanstackstart-react/README.md

10.55.02.0 KB
Original Source
<p align="center"> <a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank"> </a> </p>

Official Sentry SDK for TanStack Start React (Beta)

This SDK is currently in BETA. Beta features are still in progress and may have bugs. Please reach out on GitHub if you have any feedback or concerns.

See the Official Sentry TanStack Start SDK Docs to get started.

Compatibility

The minimum supported version of TanStack Start is 1.111.12.

Custom Usage

To set context information or to send manual events, you can use @sentry/tanstackstart-react as follows:

ts
import * as Sentry from '@sentry/tanstackstart-react';

// Set user information, as well as tags and further extras
Sentry.setTag('user_mode', 'admin');
Sentry.setUser({ id: '4711' });
Sentry.setContext('application_area', { location: 'checkout' });

// Add a breadcrumb for future events
Sentry.addBreadcrumb({
  message: '"Add to cart" clicked',
  // ...
});

// Capture exceptions or messages
Sentry.captureException(new Error('Oh no.'));
Sentry.captureMessage('Hello, world!');