Skip to main content

useSentry

Description#

Use this hook to add Sentry to an EVA Suite React module.

caution

Use this hook only once in the App component

Usage#

src/App.tsx
// ...import { useSentry } from '@springtree/eva-suite-react-hooks';// ...
const App = () => {  // ...  useSentry(    {      dsn: process.env.REACT_APP_SENTRY_DSN,      release: `${process.env.REACT_APP_NAME}@${process.env.REACT_APP_VERSION}`,      maxBreadcrumbs: 30,      environment: isProduction ? 'production' : 'test',      integrations: [new Integrations.BrowserTracing()],      tracesSampleRate: 0.1,    },    appConfigResponse,    userData.User,    endpoint,    process.env.REACT_APP_VERSION,  );
  // ...});
export default App;

References#