vega-frontend-monorepo/apps/trading/sentry.client.config.js
Matthew Russell 018e5fe139
Task/33 add sentry to trading (#189)
* add sentry setup, add VEGA_ENV to env files

* rename custom error page

* capture exception for eager connect

* add link to setup docs in comment

* add browser tracing plugin

* define sentry auth token once

* enable sourcemaps on build

* use correct sentry config property
2022-04-04 12:45:40 -07:00

14 lines
300 B
JavaScript

import * as Sentry from '@sentry/nextjs';
import { BrowserTracing } from '@sentry/tracing';
const dsn = process.env['NX_TRADING_SENTRY_DSN'];
if (dsn) {
Sentry.init({
dsn,
integrations: [new BrowserTracing()],
tracesSampleRate: 1,
environment: process.env['NX_VEGA_ENV'],
});
}