mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 18:13:29 +00:00
756b5a766f
* First try * Lint and format * Use edge runtime * Use envs for sentry * Fix type * Fix upload of sourcemaps * Try fixing monitoring calls * Fix gitbook/monitoring in middleware * test error in middleware * Define context on sentry data * Set SENTRY_ENVIRONMENT to preview or production * Format * Pass url and userAgent * Remove test cases * Disable debug * Remove ignoreBuildErrors
11 lines
182 B
TypeScript
11 lines
182 B
TypeScript
import * as Sentry from '@sentry/nextjs';
|
|
|
|
const dsn = process.env.SENTRY_DSN;
|
|
if (dsn) {
|
|
Sentry.init({
|
|
dsn,
|
|
tracesSampleRate: 1,
|
|
debug: false,
|
|
});
|
|
}
|