mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
21 lines
579 B
TypeScript
21 lines
579 B
TypeScript
import * as Sentry from '@sentry/nextjs';
|
|
|
|
const dsn = process.env.SENTRY_DSN;
|
|
if (dsn) {
|
|
Sentry.init({
|
|
debug: false,
|
|
dsn,
|
|
|
|
sampleRate: 0.1,
|
|
|
|
// Disable tracing as it creates additional requests in an env where subrequests are limited.
|
|
enableTracing: false,
|
|
|
|
// Disable transactions as it creates additional requests in an env where subrequests are limited.
|
|
// https://docs.sentry.io/platforms/node/configuration/filtering/#using--3
|
|
beforeSendTransaction: () => {
|
|
return null;
|
|
},
|
|
});
|
|
}
|